tests/testthat/test-gutenberg_strip.R

test_that("gutenberg_strip strips header and footer", {
  to_strip <- readLines(test_path("fixtures", "109-to-strip.txt"))
  test_result <- gutenberg_strip(to_strip)
  expected_result <- c(
    "Renascence and Other Poems",
    "by Edna St. Vincent Millay"
  )
  expect_identical(test_result, expected_result)
})
dgrtwo/gutenbergr documentation built on Jan. 12, 2025, 7:22 p.m.