R Under development (unstable) (2025-05-23 r88232 ucrt) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > #!/usr/bin/Rscript --vanilla > if (requireNamespace("RUnit", quietly = TRUE)) { + is_failure <- function(result) { + res <- RUnit::getErrors(result) + names(res) <- tolower(names(res)) # soothe lintr + sum_of_exceptions <- res[["nerr"]] + res[["nfail"]] + fail <- as.logical(sum_of_exceptions) + return(fail) + } + + if (interactive()) { + pkgload::load_all(path = ".") # needed to use pkgload's shim version of + # base's system.file + unit_dir <- system.file("inst", "runit_tests", package = "document") + } else { + require("document", quietly = TRUE, character.only = TRUE) || + pkgload::load_all(path = ".") + r_call <- commandArgs(trailingOnly = FALSE) + if (any(grepl("--file", r_call))) { + unit_dir <- file.path("inst", "runit_tests") + } else { + unit_dir <- system.file("runit_tests", package = "document") + } + } + if (! dir.exists(unit_dir)) { + stop("Can not find RUnit test directory ", unit_dir, + ". Try to (re)install the package first.") + } + package_suite <- RUnit::defineTestSuite("document_unit_test", + dirs = unit_dir, + testFileRegexp = "^.*\\.[rR]", + testFuncRegexp = "^test_+") + test_result <- RUnit::runTestSuite(package_suite) + RUnit::printTextProtocol(test_result, showDetails = TRUE, fileName = "") + if (is_failure(test_result)) { + RUnit::printTextProtocol(test_result, showDetails = TRUE) + stop("RUnit failed.") + } + } Executing test function test_html ... First time using roxygen2. Upgrading automatically... Setting `RoxygenNote` to "7.3.2" ✖ roxygen2 requires "Encoding: UTF-8" ℹ Current encoding is NA ℹ Loading simple Writing 'NAMESPACE' Writing 'A-Header-for.Rd' Writing 'a_first_function.Rd' CRANWIN3 windows done successfully. RUNIT TEST PROTOCOL -- Sun May 25 01:34:53 2025 *********************************************** Number of test functions: 1 Number of errors: 0 Number of failures: 0 1 Test Suite : document_unit_test - 1 test function, 0 errors, 0 failures Details *************************** Test Suite: document_unit_test Test function regexp: ^test_+ Test file regexp: ^.*\.[rR] Involved directory: D:/RCompile/CRANincoming/R-devel/lib/document/runit_tests --------------------------- Test file: D:/RCompile/CRANincoming/R-devel/lib/document/runit_tests/expected_files.r test_html: (1 checks) ... OK (16.36 seconds) Warning messages: 1: In RNGkind(kind = testSuite$rngKind, normal.kind = testSuite$rngNormalKind) : RNGkind: Marsaglia-Multicarry has poor statistical properties 2: In RNGkind(kind = testSuite$rngKind, normal.kind = testSuite$rngNormalKind) : RNGkind: severe deviations from normality for Kinderman-Ramage + Marsaglia-Multicarry > > proc.time() user system elapsed 1.25 0.28 16.51