Porting the UTF-8 tests of rlang to testthat3 was a bit tricky. The waldo_compare() function called by all testthat expectations calls reporter$local_user_output() which automatically skips the test when the locale is set to non-utf-8.
I found this workaround:
local_utf8_test <- function(frame = caller_env()) {
reporter <- get_reporter()
old <- reporter$unicode
defer(reporter$unicode <- old, envir = frame)
reporter$unicode <- FALSE
}
This doesn't seem like a proper long-term solution though.
Porting the UTF-8 tests of rlang to testthat3 was a bit tricky. The
waldo_compare()function called by all testthat expectations callsreporter$local_user_output()which automatically skips the test when the locale is set to non-utf-8.I found this workaround:
This doesn't seem like a proper long-term solution though.