tests/test_dotlibPaths.R

source("helper/helper.R")

f = get(".libPaths", envir = baseenv())
expect_same = makeCompareFun(f, backports:::.libPaths)

save <- .libPaths()

f <- tempfile()
expect_same(f)
dir.create(f)
expect_same(f)
if (getRversion() >= "4.1.0") {
  expect_same(f, include.site = FALSE)
} else {
  .libPaths(f, include.site = FALSE)
  expect_same()
}
.libPaths(save, include.site = length(.Library.site) && .Library.site %in% save)

Try the backports package in your browser

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

backports documentation built on June 24, 2024, 5:24 p.m.