Skip to content

Commit 2bfbeb3

Browse files
Similar for buffMB vs. header width
1 parent 05f3b5d commit 2bfbeb3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

inst/tests/tests.Rraw

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10108,10 +10108,15 @@ test(1658.61, fwrite(data.table(a="a"), na="VERY LONG MISSING VALUE STRING !", q
1010810108
output="maxLineLen=66")
1010910109
## eol="" error
1011010110
test(1658.62, fwrite(data.table(a=1), tempfile(), eol=''), error='eol must be 1 or more bytes')
10111-
## buffMB < single line width
10111+
## buffMB < single line width and < header width
1011210112
f = tempfile()
1011310113
test(1658.63, fwrite(data.table(a=strrep('x', 2**21)), f, buffMB=1.0), NULL)
1011410114
test(1658.64, file.size(f) > 2**20) # almost exactly 2**21, but exact number will vary by platform. we just care we didn't truncate at 1MiB.
10115+
DT=data.table(1L)
10116+
setnames(DT, strrep('y', 2**21))
10117+
test(1658.65, fwrite(DT, f, buffMB=1.0, nThread=1L), NULL)
10118+
test(1658.66, file.size(f) > 2**20)
10119+
unlink(f)
1011510120

1011610121
options(oldverbose)
1011710122
## End fwrite tests

0 commit comments

Comments
 (0)