Skip to content

Commit

Permalink
How about this this
Browse files Browse the repository at this point in the history
  • Loading branch information
chainsawriot committed Jun 2, 2024
1 parent 7102903 commit 8b82c9c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/testthat/test_compress.R
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,12 @@ test_that("Wild zip and tar ref $425", {
zip(zip_file, filename)
expect_error(rio::import(zip_file), NA)
})
for (tar_format in c(".tar")) {
withr::with_tempfile("test_files", fileext = c(".csv", tar_format), code = {
for (tar_format in c("tar", "tar.gz", "tar.bz2")) {
withr::with_tempfile("test_files", fileext = c(".csv", paste0(".", tar_format)), code = {
filename <- test_files[1]
tar_file <- test_files[2]
write.csv(1, filename)
compress_out(tar_file, filename, type = "tar")
#tar(tar_file, filename, compression = "none")
compress_out(tar_file, filename, type = tar_format)
expect_error(rio::import(tar_file), NA)
})
}
Expand Down

0 comments on commit 8b82c9c

Please sign in to comment.