tests/testthat/test-which-ttf2pt1.R

test_that("which_ttf2pt1 returns a single string path or errors helpfully", {
  res <- tryCatch(Rttf2pt1::which_ttf2pt1(), error = function(e) e)
  if (inherits(res, "error")) {
    expect_match(conditionMessage(res), "ttf2pt1", ignore.case = TRUE)
    expect_match(conditionMessage(res), "not found|could not|missing|binary", ignore.case = TRUE)
  } else {
    expect_type(res, "character")
    expect_equal(length(res), 1L)
    expect_true(nchar(res) > 0)
  }
})

Try the Rttf2pt1 package in your browser

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

Rttf2pt1 documentation built on Nov. 5, 2025, 7:46 p.m.