inst/tinytest/test_verify_script_path.R

path <- "/opt"
if(!is.na(file.info(path)$isdir) && file.access(path, mode = 2)){
  expect_warning(
    cronR:::verify_rscript_path(path),
    "You do not have write access to the specified Rscript repository path, /opt."
  )
}

expect_warning(
  cronR:::verify_rscript_path("/DirClearlyDoesNotExist"),
  "The specified Rscript repository path /DirClearlyDoesNotExist does not exist, make sure this is an existing directory without spaces."
)

Try the cronR package in your browser

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

cronR documentation built on Jan. 9, 2023, 5:10 p.m.