tests/testthat/test-options.R

context("options")

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 March 24, 2019, 8:37 p.m.