Skip to content

Commit 204bd21

Browse files
nullfile() from R 3.6.0
1 parent be3dee5 commit 204bd21

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

inst/tests/tests.Rraw

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20769,8 +20769,10 @@ DT[1, V1 := factor("a", levels = c("a", samelevel))]
2076920769
test(2311.3, nlevels(DT$V1), 2L) # used to be 3
2077020770

2077120771
# avoid translateChar*() in OpenMP threads, #6883
20772-
DF = list(rep(iconv("\uf8", from = "UTF-8", to = "latin1"), 2e6))
20773-
test(2312, fwrite(DF, nullfile(), encoding = "UTF-8", nThread = 2L), NULL)
20772+
DF = list(rep(iconv("\uf8", from="UTF-8", to="latin1"), 2e6))
20773+
# TODO(R>=3.6.0): nullfile() added to base
20774+
if (!exists("nullfile")) nullfile <- function() if (.Platform$OS.type == "windows") "nul:" else "/dev/null"
20775+
test(2312, fwrite(DF, nullfile(), encoding="UTF-8", nThread=2L), check_value=FALSE)
2077420776

2077520777
# avoid memcpy of 0-length inputs
2077620778
test(2313,

0 commit comments

Comments
 (0)