/usr/share/doc/r-cran-testthat/tests/testthat/test-examples.R is in r-cran-testthat 2.0.0-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 | context("test_examples")
test_that("test_examples works with installed packages", {
env_test$package <- "testthat"
on.exit(env_test$package <- NULL)
with_mock(
test_rd = identity,
{
res <- test_examples()
}
)
expect_true(length(res) > 1)
})
|