This file is indexed.

/usr/lib/R/site-library/BiocParallel/unitTests/test_logging.R is in r-bioc-biocparallel 1.4.0-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
## This code tests 'log' and 'progressbar'. test_errorhandling.R
## tests 'stop.on.error' and 'catch.errors'.

test_log <- function()
{
    ## SnowParam, MulticoreParam only
    params <- list(
        snow=SnowParam(2, log=FALSE),
        snowLog=SnowParam(2, log=TRUE))
    if (.Platform$OS.type != "windows") {
        params$multi=MulticoreParam(3, log=FALSE)
        params$multiLog=MulticoreParam(3, log=TRUE)
    }

    for (param in params) {
        res <- bplapply(list(1, "2", 3), sqrt, BPPARAM=param)
        checkTrue(length(res) == 3L)
        msg <- "non-numeric argument to mathematical function"
        checkIdentical(conditionMessage(res[[2]]), msg)
        checkTrue(length(attr(res[[2]], "traceback")) > 0L)
        closeAllConnections()
    }

    ## clean up
    closeAllConnections()
    TRUE
}