Debian Codegraph @

tests/testthat/test-system.R

raw
1
2 test_that("system errors are reported as expected", {
3 skip_on_cran()
4 skip_on_os("windows")
5
6 cnd <- catch(
7 renv_system_exec(
8 command = R(),
9 args = c("--vanilla", "-s", "-e", renv_shell_quote("stop('barf')")),
10 quiet = FALSE
11 )
12 )
13
14 expect_s3_class(cnd, "error")
15 expect_true(!is.null(cnd$meta))
16
17 })