tests/testthat/test-spelling.R

test_that("spell check", {
  skip_on_cran()
  skip_in_covr()
  pkg_dir <- test_package_root()
  results <- spelling::spell_check_package(pkg_dir)

  if (nrow(results)) {
    output <- sprintf(
      "Potential spelling errors: %s\n",
      paste(results$word, collapse = ", "))
    stop(output, call. = FALSE)
  } else {
    expect_true(TRUE)
  }
})

Try the callr package in your browser

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

callr documentation built on Nov. 2, 2022, 5:09 p.m.