tests/testthat/test_check_quote.R

context("Bad opening quotes")

test_that("Correctly identified", {
  expect_null(check_quote_marks("./open-quotes/no-open-quotes.tex"))
  expect_error(check_quote_marks("./open-quotes/bad-open-quotes.tex"),
               regexp = "Closing quote used at beginning of word")
  expect_error(check_quote_marks("./open-quotes/bad-dbl-open-quotes.tex"),
               regexp = "Closing quote used at beginning of word")
  expect_error(check_quote_marks("./open-quotes/bad-open-quotes-2.tex"),
               regexp = "Closing quote used at beginning of word")
  expect_error(check_quote_marks("./open-quotes/bad-open-quotes-3.tex"),
               regexp = "Closing quote used at beginning of word")
})

Try the TeXCheckR package in your browser

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

TeXCheckR documentation built on Nov. 17, 2020, 9:08 a.m.