tests/testthat/test-import.R

test_that("import() works", {
  import("tools", "file_ext")
  expect_identical(file_ext, tools::file_ext)
  expect_error(import("tools", "file_ext"), class = "importAssignedError")
  expect_error(import("tools", "file_ext", overwrite = TRUE), NA)
})

Try the mark package in your browser

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

mark documentation built on May 29, 2024, 5:13 a.m.