File: test_checkInstalled.R

package info (click to toggle)
r-bioc-biocbaseutils 1.8.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 196 kB
  • sloc: makefile: 2
file content (21 lines) | stat: -rw-r--r-- 462 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
expect_error(
    checkInstalled("abc123xyzjfk"),
    "To use this function, install missing package dependencies."
)

tinytest::expect_match(
    trimws(
        capture.output(
            tryCatch({
                checkInstalled("abc123xyzjfk")
            }, error = function(e) {
                invisible()
            })
        )[3]
    ),
    "BiocManager::install\\(\\\"abc123xyzjfk\\\"\\)"
)

expect_true(
    checkInstalled(c("base", "datasets"))
)