(v3.0.1.9114) Fix errors without cli and on R 3.0, and make the tinytest pipeline actually run the unit tests

Package:
- stop_() called cli::ansi_has_hyperlink_support() before checking that cli is available, so without cli every error became "there is no package called 'cli'"
- interpretive_rules() failed on R 3.0 for guidelines without AmpC rules (assignment to zero rows)
- Guard the ggplot2 example of wisca_plot()

CI:
- check-old: R 3.0 could not install tinytest over HTTPS, so no unit tests ran; install it with curl, and fail when tinytest is missing or any test fails
- tinytest shim: record expectations in the test file environment, support skips and errors per test_that() block, add missing testthat equivalents, source helper files
- Add R 4.0 (oldrel-6) to check-old, and oldrel-5 to check-recent
This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2026-10-10 14:54:15 +02:00
1 parent f0699c6584
commit 9e609dae83
13 files changed
+68 -32

No files matched your search

+4 -2
View File
@@ -62,8 +62,10 @@ test_that("test-misc.R", {
check_df <- function(check_element, return_val = 0) {
is_right <<- FALSE
for (env in sys.frames()) {
if (!is.null(env[[check_element]]) && is.data.frame(env[[check_element]])) {
is_right <<- all(colnames(example_isolates) %in% colnames(env[[check_element]]))
# in R < 4.2, reading a promise that is still being evaluated (such as `x` in tibble's `[`) gives an error
val <- tryCatch(env[[check_element]], error = function(e) NULL)
if (!is.null(val) && is.data.frame(val)) {
is_right <<- all(colnames(example_isolates) %in% colnames(val))
}
}
return_val