Skip to content

Commit

Permalink
Try another locale
Browse files Browse the repository at this point in the history
  • Loading branch information
hadley committed Jul 1, 2024
1 parent e40da20 commit 28757ad
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tests/testthat/test-reproducible-output.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@ test_that("local_envvar respects local context", {
})

test_that("local_collate respects local context", {
if (Sys.info()[["sysname"]] == "Windows") {
locale <- l10n_info()$codeset
} else {
locale <- "en_US"
}
locale <- switch(Sys.info()[["sysname"]],
Darwin = "en_US",
Linux = "en_US.UTF-8",
NULL
)
skip_if(is.null(locale), "Don't know good locale to use for this platform")

local_collate("C")
expect_equal(Sys.getlocale("LC_COLLATE"), "C")
Expand Down

0 comments on commit 28757ad

Please sign in to comment.