Nothing
skip_on_cran()
test_that("data dir", {
dir <- withr::with_envvar(
c(RICU_DATA_PATH = NA),
data_dir(create = FALSE)
)
expect_identical(basename(dir), "ricu")
tmp <- withr::local_tempdir()
expect_true(dir.exists(tmp))
expect_false(dir.exists(file.path(tmp, "foo")))
dir <- withr::with_envvar(
c(RICU_DATA_PATH = tmp),
data_dir("foo")
)
expect_true(dir.exists(file.path(tmp, "foo")))
})
test_that("set config", {
cfg <- list(a = 1L, b = 1L:3L, c = list(a = 1L, b = 1L:3L))
tmp <- withr::local_tempdir()
expect_false(file.exists(file.path(tmp, "foo.json")))
expect_null(set_config(cfg, "foo", tmp))
expect_true(file.exists(file.path(tmp, "foo.json")))
res <- get_config("foo", tmp)
expect_identical(cfg, res)
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.