# NOT RUN {
path <- file.path(tempdir(), "myFirstPackage")
packager::create(path = path, fakemake = "roxygen2")
list.files(path, recursive = TRUE)
# }
# NOT RUN {
if (require("roxygen2")) {
ml <- packager::get_package_makelist(is_cran = TRUE)
d <- file.path(tempdir(), "somePackage")
dir.create(d)
packager::create(d, fakemake = FALSE, fakemake = FALSE)
withr::with_dir(d, fakemake::make("check", ml))
check_log <- file.path(d, "log", "check.Rout")
status <- packager::get_check_status(check_log)
RUnit::checkEqualsNumeric(status[["status"]][["errors"]], 0)
list.files(d, recursive = TRUE)
unlink(d, recursive = TRUE)
}
# }
Run the code above in your browser using DataLab