Skip to content

Commit 81faa4d

Browse files
skip the test on non-ASCII files if the OS is not Windows
1 parent 5824533 commit 81faa4d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tests/testthat/test-encoding.R

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
context("non-ASCII characters are handled properly")
22

33
test_that("non-ASCII characters are handled properly", {
4-
# c.f. rlang::mut_latin1_locale()
5-
locale <- if (.Platform$OS.type == "windows") "English_United States.1252" else "en_US.ISO8859-1"
4+
skip_if(.Platform$OS.type != "windows")
65

76
withr::with_locale(
8-
c(LC_CTYPE = locale),
7+
c(LC_CTYPE = "English_United States.1252"),
98
{
109
tmp <- tempfile(fileext = ".R")
1110
con <- file(tmp, encoding = "UTF-8")

0 commit comments

Comments
 (0)