Skip to content

Commit 5824533

Browse files
fix test condition
1 parent 2fe2a46 commit 5824533

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

tests/testthat/test-encoding.R

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,16 @@ test_that("non-ASCII characters are handled properly", {
77
withr::with_locale(
88
c(LC_CTYPE = locale),
99
{
10-
# c.f. dplyr's tests/testthat/helper-encoding.R
11-
latin_string <- "Gl\u00fcck+1"
12-
1310
tmp <- tempfile(fileext = ".R")
1411
con <- file(tmp, encoding = "UTF-8")
1512
on.exit(close(con), add = TRUE)
1613

17-
writeLines(latin_string, con)
14+
# c.f. dplyr's tests/testthat/helper-encoding.R
15+
writeLines("Gl\u00fcck+1", con)
16+
1817
style_file(tmp)
1918
result <- readLines(con)
20-
expect_equal(result, latin_string)
19+
expect_equal(result, "Gl\u00fcck + 1")
2120
}
2221
)
2322
})

0 commit comments

Comments
 (0)