@@ -10978,8 +10978,8 @@ test(1732.8, fwrite(DT, quote='auto', na="NA"), output='A,B\nNA,5\n"NA",7\n"",0\
1097810978
1097910979# dec=","
1098010980# Test 1733.1 removed, see #7227
10981- test(1733.1 , fwrite(data.table(c(1.2,-8.0,pi,67.99),1:4),dec=",",sep=";"),
10982- output="V1;V2\n1,2;1\n-8;2\n3,14159265358979;3\n67,99;4")
10981+ test(1733.2 , fwrite(data.table(c(1.2,-8.0,pi,67.99),1:4),dec=",",sep=";"),
10982+ output="V1;V2\n1,2;1\n-8;2\n3,14159265358979;3\n67,99;4")
1098310983
1098410984# fwrite implied and actual row.names
1098510985DT = data.table(foo=1:3,bar=c(1.2,9.8,-6.0))
@@ -21595,9 +21595,10 @@ test(2336.5, all.equal(t1 - as.Date(t2), t1 - t2))
2159521595test(2336.6, all.equal(t2 - as.Date(t1), t2 - t1))
2159621596
2159721597# fwrite: allow dec=',' with single column, #7227
21598- test(2337.1, fwrite(data.table(1), dec = ",", file = nullfile()), NULL)
21599- if (getRversion() >= "4.0.0") {
21600- test(2337.2, fwrite(data.table(1, 2), dec = ",", sep = ","), error = "dec and sep must be distinct for multi-column tables with >0 rows")}
21601- test(2337.3, fwrite(data.table(c(0.1, 0.2)), dec = ",", sep = "\t", file = nullfile()), NULL)
21602- test(2337.4, fwrite(data.table(a = numeric(), b = numeric()), dec = ",", sep = ","), NULL)
21603- test(2337.5, fwrite(data.table(a = numeric()), dec = ",", sep = ","), NULL)
21598+ test(2337.1, fwrite(data.table(1), dec=","), NULL)
21599+ if (getRversion() >= "4.0.0") { # rely on stopifnot(named = ...) for correct message
21600+ test(2337.2, fwrite(data.table(0.1, 0.2), dec=",", sep=","), error = "dec and sep must be distinct")
21601+ }
21602+ test(2337.3, is.null(fwrite(data.table(c(0.1, 0.2)), dec=",", sep="\t")))
21603+ test(2337.4, is.null(fwrite(data.table(a=numeric(), b=numeric()), dec=",", sep=",")))
21604+ test(2337.5, is.null(fwrite(data.table(a=numeric()), dec=",", sep=",")))
0 commit comments