test_that("temporary output paths are safe for CRAN", { out_dir <- file.path(tempdir(), "biofetchR_test_output") dir.create(out_dir, recursive = TRUE, showWarnings = FALSE) expect_true(dir.exists(out_dir)) expect_true(startsWith(normalizePath(out_dir, winslash = "/", mustWork = FALSE), normalizePath(tempdir(), winslash = "/", mustWork = FALSE))) if ("bf_cache_dir" %in% getNamespaceExports("biofetchR")) { cache_path <- biofetchR::bf_cache_dir() expect_true(is.character(cache_path)) expect_length(cache_path, 1) expect_true(nzchar(cache_path)) } })