@@ -21571,13 +21571,14 @@ test(2335.6, isoyear(as.Date("2019-12-30")), 2020L)
2157121571dd = data.table(x=c(1, 2, 3))
2157221572di = data.table(x=c(1L, 2L, 3L))
2157321573test(2336.1, capture.output(fwrite(dd, forceDecimal=TRUE)), c("x", "1.", "2.", "3."))
21574- test(2336.2, capture.output(fwrite(dd, forceDecimal=FALSE)), c("x", "1", "2", "3"))
21575- test(2336.3, capture.output(fwrite(di, forceDecimal=TRUE)), c("x", "1", "2", "3"))
21576- test(2336.4, capture.output(fwrite(data.table(x=c(0.)), forceDecimal=TRUE)), c("x", "0."))
21577- test(2336.5, capture.output(fwrite(data.table(x=c(-0.)), forceDecimal=TRUE)), c("x", "0."))
21574+ test(2336.2, capture.output(fwrite(dd, forceDecimal=TRUE, dec=",", sep="\t")), c("x", "1,", "2,", "3,"))
21575+ test(2336.3, capture.output(fwrite(dd, forceDecimal=FALSE)), c("x", "1", "2", "3"))
21576+ test(2336.4, capture.output(fwrite(di, forceDecimal=TRUE)), c("x", "1", "2", "3"))
21577+ test(2336.5, capture.output(fwrite(data.table(x=c(0.)), forceDecimal=TRUE)), c("x", "0."))
21578+ test(2336.6, capture.output(fwrite(data.table(x=c(-0.)), forceDecimal=TRUE)), c("x", "0."))
2157821579# round trip
2157921580local({
2158021581 f <- tempfile(); on.exit(unlink(f))
21581- test(2336.6 , {fwrite(dd, f, forceDecimal=TRUE); fread(f)}, dd)
21582- test(2336.7 , {fwrite(dd, f, forceDecimal=FALSE); fread(f)}, di)
21582+ test(2336.7 , {fwrite(dd, f, forceDecimal=TRUE); fread(f)}, dd)
21583+ test(2336.8 , {fwrite(dd, f, forceDecimal=FALSE); fread(f)}, di)
2158321584})
0 commit comments