tests/test_dir.exists.R

source("helper/helper.R")

if (exists("dir.exists", envir = baseenv())) {
  f = get("dir.exists", envir = baseenv())
  expect_same = makeCompareFun(f, backports:::dir.exists)

  expect_same(tempdir())
  expect_same(tempfile())
  expect_same(rep.int(tempdir(), 2))
  expect_same(TRUE)
}

Try the backports package in your browser

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

backports documentation built on Dec. 13, 2021, 5:08 p.m.