tests/testthat/helper-locale.R

is_locale_available <- function(loc){
  set_locale_failed <- FALSE
  tryCatch(
    withr::with_locale(c(LC_COLLATE=loc), {}),
    warning = function(e){ set_locale_failed <<- TRUE }
  )
  !set_locale_failed
}
rstudio/htmltools documentation built on March 29, 2024, 2:22 p.m.