tools/test_vanilla.R

#!/usr/bin/env Rscript

Sys.setenv(RENV_CONFIG_AUTOLOADER_ENABLED = "FALSE")

args <- commandArgs(trailingOnly = FALSE)
file_arg <- "--file="
script_path <- sub(file_arg, "", args[grepl(file_arg, args)][1])
project <- normalizePath(file.path(dirname(script_path), ".."), winslash = "/", mustWork = TRUE)

suppressPackageStartupMessages({
  library(pkgload)
  library(testthat)
})

pkgload::load_all(project, quiet = TRUE)
testthat::test_dir(file.path(project, "tests", "testthat"), reporter = "summary")

Try the cre.dcf package in your browser

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

cre.dcf documentation built on April 10, 2026, 5:08 p.m.