tests/testthat/test-set_time_locale.R

test_that("locale is set to English", {
  skip_on_cran()  # We can't be sure which locales are installed on CRAN
  set_time_locale("eng")
  expect_match(Sys.getlocale("LC_TIME"), "(English|en)")
})

test_that("locale is set to German", {
  skip_on_cran()  # We can't be sure which locales are installed on CRAN
  set_time_locale("deu")
  expect_match(Sys.getlocale("LC_TIME"), "(German|de)")
})

Try the cmsafvis package in your browser

Any scripts or data that you put into this service are public.

cmsafvis documentation built on Sept. 15, 2023, 5:15 p.m.