tests/testthat/test-options.R

test_that("error for unknown options", {

  expect_error(
    r_process_options(func = function() {}, foo = "bar"),
    "Unknown option"
  )

  expect_error(
    r_process_options(func = function() {}, foo = "bar", bar = "foo"),
    "Unknown options"
  )

  gc()
})
MangoTheCat/callr documentation built on March 26, 2024, 11:23 a.m.