tests/testthat/test-get_leftovers.R

test_that("get_leftovers works", {
  text <- "\\documentclass{article}\\begin{document}\\end{document}\nsome stuff after the document"
  expect_equal(unname(get_leftovers(text)),
               "some stuff after the document")

})

Try the parseLatex package in your browser

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

parseLatex documentation built on June 8, 2025, 10:19 a.m.