Skip to content

Commit eede93f

Browse files
add a test for the other extreme compressLevel=9
1 parent 6b76bea commit eede93f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

inst/tests/tests.Rraw

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10016,9 +10016,11 @@ if (!haszlib()) {
1001610016
if (test_R.utils) test(1658.43, fread(f1), DT) # use fread to decompress gz (works cross-platform)
1001710017
fwrite(DT, file=f3<-tempfile(), compress="gzip") # compress to filename not ending .gz
1001810018
fwrite(DT, file=f4<-tempfile(), compress="gzip", compressLevel=1) # test compressLevel
10019+
fwrite(DT, file=f5<-tempfile(), compress="gzip", compressLevel=9)
1001910020
test(1658.441, file.info(f3)$size, file.info(f1)$size)
10020-
test(1658.442, file.info(f4)$size > file.info(f1)$size, TRUE)
10021-
unlink(c(f1,f2,f3,f4))
10021+
test(1658.442, file.info(f4)$size > file.info(f1)$size)
10022+
test(1658.443, file.info(f1)$size > file.info(f5)$size)
10023+
unlink(c(f1,f2,f3,f4,f5))
1002210024
}
1002310025
DT = data.table(a=1:3, b=list(1:4, c(3.14, 100e10), c("foo", "bar", "baz")))
1002410026
test(1658.45, fwrite(DT), output=c("a,b","1,1|2|3|4","2,3.14|1e+12","3,foo|bar|baz"))

0 commit comments

Comments
 (0)