You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: inst/tests/tests.Rraw
+36-25Lines changed: 36 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -147,6 +147,20 @@ if (!test_longdouble) {
147
147
tt = Sys.getenv("TZ", unset=NA)
148
148
TZnotUTC = !identical(tt,"") && !is_utc(tt)
149
149
150
+
## nice utf8 testing code added in #7210 - to be called from inside local() !
151
+
utf8_check_expr = quote(l10n_info()$`UTF-8` || {
152
+
lc_ctype = Sys.getlocale('LC_CTYPE')
153
+
lc_wantctype = 'en_US.UTF-8'
154
+
# Japanese multibyte characters require utf8. As of 2025, we're likely to be already running in a UTF-8 locale, but if not, try this setlocale() call as a last chance.
155
+
# Unfortunately, there is no guaranteed, portable way of switching to UTF-8 US English.
# uniqueN(x, by=character()) was internal error, #4594
@@ -18619,19 +18637,8 @@ test(2252.1, dt[, b:=2L], error = "\\[ was called on a data.table.*not data.tabl
18619
18637
test(2252.2, dt[, let(b=2L)], error = "\\[ was called on a data.table.*not data.table-aware.*'let'")
18620
18638
rm(.datatable.aware)
18621
18639
18622
-
# tests for trunc.char handling wide characters # 5096
18623
-
local(if (l10n_info()$`UTF-8` || {
18624
-
lc_ctype = Sys.getlocale('LC_CTYPE')
18625
-
lc_wantctype = 'en_US.UTF-8'
18626
-
# Japanese multibyte characters require utf8. As of 2025, we're likely to be already running in a UTF-8 locale, but if not, try this setlocale() call as a last chance.
18627
-
# Unfortunately, there is no guaranteed, portable way of switching to UTF-8 US English.
0 commit comments