File: test-zip-process.R

package info (click to toggle)
r-cran-zip 2.3.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 768 kB
  • sloc: ansic: 8,079; makefile: 2
file content (23 lines) | stat: -rw-r--r-- 538 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
test_that("zip_process", {
  z <- make_a_zip()

  zip2 <- test_temp_file(".zip")
  p <- zip_process()$new(zip2, z$ex)
  p$wait(2000)
  p$kill()

  expect_equal(p$get_exit_status(), 0L)
  expect_equal(zip_list(z$zip), zip_list(zip2))
})

test_that("can omit directories", {
  z <- make_a_zip(include_directories = FALSE)

  zip2 <- test_temp_file(".zip")
  p <- zip_process()$new(zip2, z$ex, include_directories = FALSE)
  p$wait(2000)
  p$kill()

  expect_equal(p$get_exit_status(), 0L)
  expect_equal(zip_list(z$zip), zip_list(zip2))
})