inst/tinytest/test_delete_trailing_blank_lines.R

if (interactive()) {
  pkgload::load_all()
  library("tinytest")
}


template <- system.file("files", "blanks.txt", package = "fritools")
input <- tempfile()
file.copy(template, input)
delete_trailing_blank_lines(file_names = input)
result <- readLines(input)
template <- readLines(template)
expect_identical(length(result), as.integer(length(template) - 2))

Try the fritools package in your browser

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

fritools documentation built on June 8, 2025, 11:59 a.m.