diff --git a/tests/testthat/test-utf8.R b/tests/testthat/test-utf8.R new file mode 100644 index 000000000..ccf032c0c --- /dev/null +++ b/tests/testthat/test-utf8.R @@ -0,0 +1,13 @@ +context("UTF-6 with 4.2") + +# for more, see: https://github.com/r-lib/styler/issues/847 +# this behavior is likely to change with R 4.2 +test_that("styling unicode characters on Windows", { + skip_if_not(.Platform$OS.type[[1]] == "windows") + skip_if(getRversion() < '4.2') + skip_on_cran() + expect_identical( + styler::style_text('suit <- "♠"'), + structure("suit <- \"♠\"", class = "vertical") + ) +})