tests/testthat/test-known_symbols.R

test_that("known symbols", {
  expect_equal(translate_latexmath(pi), latexmath("\\pi"))
  expect_equal(translate_latexmath("pi"), latexmath("pi"))

  # quoted object
  expect_equal(translate_latexmath_(quote(pi)), latexmath("\\pi"))
  expect_equal(translate_latexmath_(quote("pi")), latexmath("pi"))
})
yiluheihei/rlatexmath documentation built on Jan. 1, 2021, 1:44 p.m.