Skip to content

Commit 4866a2b

Browse files
more crptd file in 2nd test
1 parent 5711d91 commit 4866a2b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

inst/tests/tests.Rraw

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21196,7 +21196,8 @@ test(2319.2, !is.null(attr(dt_get0, ".internal.selfref")))
2119621196
# Improved fread error handling for cmd exe and decompression #5415
2119721197
test(2320.1, fread(cmd="false"), error="External command failed with exit code") # external command execution error handling
2119821198
if (test_R.utils) {
21199-
writeBin(c(0x1F, 0x8B, 0xFF, 0xFF), f<-tempfile(fileext=".csv.gz"))
21200-
test(2320.2, fread(f), error="R.utils::decompressFile failed to decompress") # Compressed file decompression error handling
21199+
corrupted_data <- c(0x1F, 0x8B, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, rep(0xFF, 50), 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF)
21200+
writeBin(as.raw(corrupted_data), f<-tempfile(fileext=".csv.gz"))
21201+
test(2320.2, fread(f), error="decompressFile.*failed|failed.*decompress")
2120121202
unlink(f)
2120221203
}

0 commit comments

Comments
 (0)