tests/testthat/test_strip_comments.R

context("Strip comments")

test_that("Strip comments examples", {
  some_lines <- c("Text. % A comment", "20\\% of comments are % useful")
  expect_equal(strip_comments(some_lines), c("Text. %", "20\\% of comments are %"))
  expect_equal(strip_comments(some_lines, retain.percent.symbol = FALSE),
               c("Text. ", "20\\% of comments are "))
})

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.