tests/testthat/test-install-zip.R

test_that("make_unzip_process", {

  zipfile <- system.file(package = "pkgdepends", "tools", "xxx.zip")
  mkdirp(tmp <- tempfile())
  on.exit(unlink(tmp, recursive = TRUE), add = TRUE)

  px <- make_unzip_process(zipfile, exdir = tmp)
  px$wait(5000)
  px$kill()

  expect_equal(px$get_exit_status(), 0)
  expect_true(file.exists(file.path(tmp, "xxx")))
})

Try the pkgdepends package in your browser

Any scripts or data that you put into this service are public.

pkgdepends documentation built on May 29, 2024, 1:56 a.m.