diff --git a/allowlists/cran.allowlist b/allowlists/cran.allowlist index 904fe72..2d92333 100644 --- a/allowlists/cran.allowlist +++ b/allowlists/cran.allowlist @@ -1,2 +1,3 @@ cli data.table +remotes diff --git a/integration_tests/tests/cran.bats b/integration_tests/tests/cran.bats index 4d130a7..cf2e5b4 100644 --- a/integration_tests/tests/cran.bats +++ b/integration_tests/tests/cran.bats @@ -2,6 +2,21 @@ Rscript -e 'install.packages("data.table")' } +@test "Install archived version of data.table" { + Rscript -e 'packagename <- "data.table" + version <- "1.13.0" # or 1.12.0 + packageurl <- paste0(contrib.url(getOption("repos")), "/Archive/", packagename, "/", packagename, "_", version, ".tar.gz") + install.packages(packageurl, repos=NULL, type="source") + ' +} + +@test "Install archived version of data.table using remotes" { + Rscript -e ' + install.packages("remotes") + remotes::install_version("data.table", version = "1.13.0") + ' +} + @test "Install ggplot2" { run Rscript -e 'install.packages("ggplot2")' [[ "$output" == *"download of package ‘ggplot2’ failed"* ]]