tests/testthat/test-verbose_on_off.R

test_that("verbose_on_off works", {
  expect_equal(
    {
      all(
        {
          options(Rapi_verbose = FALSE)
          FALSE == check_verbose_option()
        },
        {
          options(Rapi_verbose = TRUE)
          a <- check_verbose_option()
          a == TRUE
        },
        {
          options(Rapi_verbose = FALSE)
          FALSE == check_verbose_option()
        }
      )
    },
    T
  )
})

Try the Rapi package in your browser

Any scripts or data that you put into this service are public.

Rapi documentation built on May 29, 2024, 2:34 a.m.