# \donttest{
# Adjust CRAN repo (example only)
r <- getOption("repos")
r["CRAN"] <- "http://cran.us.r-project.org"
old <- options(repos = r)
# Example package contained in test.assessr
dp <- system.file(
"test-data",
"test.package.0001_0.1.0.tar.gz",
package = "test.assessr"
)
# Set up package
install_list <- set_up_pkg(dp)
pkg_source_path <- install_list$pkg_source_path
# Install package locally (ensures correct test paths)
install_package_local(pkg_source_path)
# Detect tests and snapshots
test_pkg_data <- check_pkg_tests_and_snaps(pkg_source_path)
# Restore options
options(old)
# }
Run the code above in your browser using DataLab