inst/tinytest/test_convert_umlauts_to_tex.R

if (interactive()) {
  pkgload::load_all()
  library("tinytest")
}
if (fritools2::is_version_sufficient(
  fritools2::get_package_version("base"),
  "4.0.0"
)) {
  if (interactive()) pkgload::load_all(".")

  string <- c(
    "\u00e4", "\u00c4", "\u00f6", "\u00d6", "\u00fc", "\u00dc",
    "\u00df"
  )
  expectation <- c(
    "\\\"a{}", "\\\"A{}", "\\\"o{}", "\\\"O{}", "\\\"u{}",
    "\\\"U{}", "\\ss{}"
  )
  result <- convert_umlauts_to_tex(string)
  expect_identical(result, expectation)
}
if (interactive()) {

}

Try the fritools2 package in your browser

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

fritools2 documentation built on July 9, 2023, 7:07 p.m.