diff --git a/R/resolve.R b/R/resolve.R index 50191cd..3bc7937 100644 --- a/R/resolve.R +++ b/R/resolve.R @@ -214,7 +214,11 @@ if (isTRUE(no_enhances)) { disabled_types <- c(disabled_types, "Enhances") } - res <- dep_df[!dep_df$type %in% disabled_types & dep_df$y != "R" & !(dep_df$y %in% c("datasets", "utils", "grDevices", "graphics", "stats", "methods", "tools", "grid", "splines", "parallel", "stats4", "tcltk", "MASS", "nnet", "class", "spatial")),] + res <- dep_df[!dep_df$type %in% disabled_types & + dep_df$y != "R" & !(dep_df$y %in% + c("datasets", "utils", "grDevices", "graphics", "stats", "methods", "tools", + "grid", "splines", "parallel", "stats4", "tcltk", "MASS", "nnet", "class", "spatial", + "eda", "lqs", "mle", "modreg", "mva", "stepfun", "ts")),] if (nrow(res) == 0) { return(NULL) } diff --git a/tests/testdata/superancientsna.RDS b/tests/testdata/superancientsna.RDS new file mode 100644 index 0000000..1379b5f Binary files /dev/null and b/tests/testdata/superancientsna.RDS differ diff --git a/tests/testthat/test_dockerize.R b/tests/testthat/test_dockerize.R index cd1495e..6c278f3 100644 --- a/tests/testthat/test_dockerize.R +++ b/tests/testthat/test_dockerize.R @@ -101,14 +101,14 @@ test_that("Dockerize R < 3.1 and >= 2.1", { expect_true(any(grepl("^RUN mkdir", Dockerfile))) }) -test_that("Docker R < 2.1", { +test_that("Docker R < 1.3.1", { rang_rio <- readRDS("../testdata/rang_rio_old.RDS") - rang_rio$r_version <- "2.1.0" ## exactly 2.1.0, no error + rang_rio$r_version <- "1.3.1" ## exactly 1.3.1, no error temp_dir <- .generate_temp_dir() expect_error(dockerize(rang_rio, output_dir = temp_dir), NA) rang_rio <- readRDS("../testdata/rang_rio_old.RDS") -## rang_rio$r_version <- "2.0.0" -## expect_error(dockerize(rang_rio, output_dir = temp_dir)) + rang_rio$r_version <- "1.3.0" + expect_error(dockerize(rang_rio, output_dir = temp_dir)) }) test_that(".group_sysreqs and issue #21", { diff --git a/tests/testthat/test_expost_rang.R b/tests/testthat/test_expost_rang.R index 0a05489..2d33006 100644 --- a/tests/testthat/test_expost_rang.R +++ b/tests/testthat/test_expost_rang.R @@ -180,3 +180,8 @@ test_that("renv export unknown source", { graph$ranglets[[1]]$original$x_pkgref <- "errr::or" expect_error(export_rang(graph, temp_dir)) }) + +test_that("Super ancient special packages", { + graph <- readRDS("../testdata/superancientsna.RDS") + expect_error(.generate_installation_order(graph), NA) +})