tests/testthat/test-rsOpts.R

context("rsOpts & .vMessage")

test_that("setting global options",{
   expect_false(options("RStoolbox.verbose")[[1]])
   expect_silent(.vMessage("MIC CHECK 12"))
   expect_silent(rsOpts(verbose = TRUE))
   expect_true(options("RStoolbox.verbose")[[1]])
   expect_message(.vMessage("MIC CHECK 12"), "MIC CHECK 12")
   expect_silent(rsOpts(verbose = FALSE))
})

Try the RStoolbox package in your browser

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

RStoolbox documentation built on May 29, 2024, 6:34 a.m.