Skip to content

Commit

Permalink
remove unused ISO-8859-2 tests and comments (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
cjyetman authored Jan 15, 2024
1 parent 8e2543d commit ad8d1cd
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions tests/testthat/test-guess_file_encoding.R
Original file line number Diff line number Diff line change
Expand Up @@ -116,23 +116,20 @@ test_that("returns expected values", {
ascii <- withr::local_tempfile(fileext = ".csv")
utf8 <- withr::local_tempfile(fileext = ".csv")
iso8859_1 <- withr::local_tempfile(fileext = ".csv")
iso8859_2 <- withr::local_tempfile(fileext = ".csv")
# windows1252 <- withr::local_tempfile(fileext = ".csv")
# cp850 <- withr::local_tempfile(fileext = ".csv")
# cp1252 <- withr::local_tempfile(fileext = ".csv")

write.csv(data.frame(a = 1, b = 2), file = ascii)
write.csv(data.frame(a = "\u00b5"), file = utf8, fileEncoding = "UTF-8")
write.csv(data.frame(a = "\u00b5"), file = iso8859_1, fileEncoding = "ISO-8859-1")
# write.csv(data.frame(a = "\u00b5"), file = iso8859_2, fileEncoding = "ISO-8859-2")
# write.csv(data.frame(a = "\u00b5"), file = windows1252, fileEncoding = "windows1252")
# write.csv(data.frame(a = "\x81"), file = cp850, fileEncoding = "cp850")
# write.csv(data.frame(a = "\xf8"), file = cp1252, fileEncoding = "cp1252")

expect_identical(guess_file_encoding(ascii), "ascii")
expect_identical(guess_file_encoding(utf8), "UTF-8")
expect_identical(guess_file_encoding(iso8859_1), "ISO-8859-1")
# expect_identical(guess_file_encoding(iso8859_2), "ISO-8859-1")
# expect_identical(guess_file_encoding(windows1252), "windows1252")
# expect_identical(guess_file_encoding(cp850), "cp850")
# expect_identical(guess_file_encoding(cp1252), "cp1252")
Expand Down

0 comments on commit ad8d1cd

Please sign in to comment.