Skip to content

Commit 478d3f5

Browse files
nullfile() from R 3.6.0
1 parent 62b3e8e commit 478d3f5

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
@@ -20764,8 +20764,10 @@ DT[1, V1 := factor("a", levels = c("a", samelevel))]
2076420764
test(2311.3, nlevels(DT$V1), 2L) # used to be 3
2076520765

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

2077020772
# avoid memcpy of 0-length inputs
2077120773
test(2313,

0 commit comments

Comments
 (0)