context("download_package_plan")
test_that("can download a plan", {
skip_on_cran()
withr::local_options(list(repos = "https://cloud.r-project.org/"))
lib <- tempfile()
on.exit(unlink(lib, recursive = TRUE), add = TRUE)
rem <- pkgdepends::remotes()$new("processx", library = lib)
rem$solve()
plan <- rem$get_install_plan(FALSE)
plan2 <- download_package_plan(plan, quiet = TRUE)
expect_true("file" %in% colnames(plan2))
expect_true("download_dir" %in% colnames(plan2))
expect_equal(length(unique(plan2$download_dir)), 1)
expect_true(all(file.exists(plan2$file)))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.