tests/testthat/test-directory.R

context("test-directory")

test_that("check_is_dir() doesn't give false positive for trailing slash", {
  pwd <- sub("/$", "", getwd())
  expect_error_free(check_path_is_directory(paste0(pwd, "/")))
})

Try the usethis package in your browser

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

usethis documentation built on July 4, 2019, 5:05 p.m.