tests/testthat/test-dont_ask.R

context("dont_ask")

test_that("dont_ask returns current GUI state", {
  expect_identical(dont_ask(), !interactive() || !gui_ask(gui))
  expect_error(
    if (interactive()) dont_ask(gui = "noGUI") else
      stop("'gui' object 'noGUI' not found"),
    "'gui' object 'noGUI' not found",
    fixed = TRUE
  )
})

Try the svGUI package in your browser

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

svGUI documentation built on April 17, 2021, 1:08 a.m.