From 8b3fbf8ccf409d3656a79214e2f296f024505f22 Mon Sep 17 00:00:00 2001 From: jangorecki Date: Fri, 24 Nov 2023 18:08:41 +0100 Subject: [PATCH] more tests needs escape --- inst/tests/tests.Rraw | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/inst/tests/tests.Rraw b/inst/tests/tests.Rraw index 807983d3f..59d362ddb 100644 --- a/inst/tests/tests.Rraw +++ b/inst/tests/tests.Rraw @@ -9881,16 +9881,16 @@ test(1658.39, fwrite(matrix(1:3, nrow=3, ncol=1), quote = TRUE), output = '"V1"\ test(1658.40, fwrite(matrix(1:4, nrow=2, ncol=2, dimnames = list(c("ra","rb"),c("ca","cb"))), quote = TRUE), output = '"ca","cb"\n.*1,3\n2,4', message = "x being coerced from class: matrix to data.table") # fwrite compress -test(1658.41, fwrite(data.table(a=c(1:3), b=c(1:3)), compress="gzip"), output='a,b\n1,1\n2,2\n3,3') # compress ignored on console -DT = data.table(a=rep(1:2,each=100), b=rep(1:4,each=25)) -test(1658.421, fwrite(DT, file=f1<-tempfile(fileext=".gz"), verbose=TRUE), NULL, - output="args.nrow=200 args.ncol=2.*maxLineLen=5[12].*Writing 200 rows in 1 batches of 200 rows.*nth=1") # [12] for Windows where eolLen==2 -test(1658.422, fwrite(DT, file=f2<-tempfile()), NULL) -test(1658.423, file.info(f1)$size < file.info(f2)$size) # 74 < 804 (file.size() isn't available in R 3.1.0) -if (test_R.utils) test(1658.43, fread(f1), DT) # use fread to decompress gz (works cross-platform) if (nozlib()) { - test(1658.442, fwrite(DT, file=f3<-tempfile(), compress="gzip"), error="header files were not found at the time data.table was compiled") + test(1658.409, fwrite(data.table(a=1), file=tempfile(), compress="gzip"), error="header files were not found at the time data.table was compiled") } else { + test(1658.41, fwrite(data.table(a=c(1:3), b=c(1:3)), compress="gzip"), output='a,b\n1,1\n2,2\n3,3') # compress ignored on console + DT = data.table(a=rep(1:2,each=100), b=rep(1:4,each=25)) + test(1658.421, fwrite(DT, file=f1<-tempfile(fileext=".gz"), verbose=TRUE), NULL, + output="args.nrow=200 args.ncol=2.*maxLineLen=5[12].*Writing 200 rows in 1 batches of 200 rows.*nth=1") # [12] for Windows where eolLen==2 + test(1658.422, fwrite(DT, file=f2<-tempfile()), NULL) + test(1658.423, file.info(f1)$size < file.info(f2)$size) # 74 < 804 (file.size() isn't available in R 3.1.0) + if (test_R.utils) test(1658.43, fread(f1), DT) # use fread to decompress gz (works cross-platform) fwrite(DT, file=f3<-tempfile(), compress="gzip") # compress to filename not ending .gz test(1658.441, file.info(f3)$size, file.info(f1)$size) }