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()
})
r-pkgs/callr documentation built on Aug. 31, 2024, 11:34 a.m.