Skip to content

Commit

Permalink
Revert "WIP", that was related to investigating something else
Browse files Browse the repository at this point in the history
This reverts commit 9fab14a.
  • Loading branch information
jennybc committed Jan 11, 2024
1 parent cdf72f6 commit c9503bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 19 deletions.
14 changes: 0 additions & 14 deletions tests/testthat/_snaps/utf8.md

This file was deleted.

7 changes: 2 additions & 5 deletions tests/testthat/test-utf8.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,17 @@ test_that("UTF-8 encoding, string input", {
)
out_utf8 <- reprex(input = in_utf8)

expect_true(all(Encoding(out_utf8) %in% c("unknown", "UTF-8")))

i_in <- grep("^x <-", in_utf8)
i_out <- grep("^x <-", out_utf8)
expect_identical(charToRaw(in_utf8[i_in]), charToRaw(out_utf8[i_out]))

i_out <- grep("^#> \\[1\\]", out_utf8)
expect_equal(Encoding(out_utf8)[i_out], "UTF-8")
expect_match(out_utf8[i_out], "[\u00C0]")
expect_match(out_utf8[i_out], "[\u00CB]")
expect_match(out_utf8[i_out], "[\u00D0]")

expect_snapshot(print(out_utf8[i_out]))
expect_snapshot(print(charToRaw(out_utf8[i_out])))
#expect_snapshot(print(Sys.getlocale()))

in_latin1 <- iconv(in_utf8, from = "UTF-8", to = "latin1")
out_latin1 <- reprex(input = in_latin1)

Expand Down

0 comments on commit c9503bf

Please sign in to comment.