Skip to content

Commit

Permalink
Skip UTF8 filepaths on old R
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed Nov 5, 2018
1 parent 883e8a9 commit 7fcd60e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/testthat/test-encoding.R
Expand Up @@ -11,6 +11,7 @@ test_that("UTF-8 encoded text arguments", {
})

test_that("UTF-8 filenames, binary data", {
skip_if(getRversion() < "3.5")
tmp <- paste(tempdir(), "\u0420\u0423\u0421\u0421\u041a\u0418\u0419.txt", sep = "/")
tmp <- normalizePath(tmp, mustWork = FALSE)
f <- file(tmp, 'wb')
Expand All @@ -29,6 +30,7 @@ test_that("UTF-8 filenames, binary data", {
})

test_that("UTF-8 filename as std_in", {
skip_if(getRversion() < "3.5")
input <- c("foo", "bar", "baz")
txt <- readLines(system.file('utf8.txt', package = 'sys', mustWork = TRUE), encoding = 'UTF-8')
tmp <- normalizePath(paste(tempdir(), txt, sep = "/"), mustWork = FALSE)
Expand Down

0 comments on commit 7fcd60e

Please sign in to comment.