tests/test_zz.R

library(testthat)
if (Sys.info()[["sysname"]] == "Darwin") {
  test_that("Warning if multibyte support is not detected", {
    withr::with_locale(new = c("LC_CTYPE" = "en_US.US-ASCII"), code = {
      expect_message(library(datefixR), paste0(
        "The current locale does not support multibyte characters. ",
        "You may run into difficulties if any months are given as ",
        "non-English language names. \n"
      ))
    })
  })
}

Try the datefixR package in your browser

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

datefixR documentation built on Sept. 3, 2023, 5:08 p.m.