tests/testthat/test-showlines.R

test_that("shows lines", {

  data1 <- data.frame("Line" = c(1, 2),
                      "Text" = c("x", "y"),
                      stringsAsFactors = FALSE)

  expect_equal(showlines(scriptsearch(c("x", "y"), system.file("extdata", package = "scriptsearch"), filetypes = "txt"), 1, open = FALSE), data1)

})
carlos-r-git/scriptsearch documentation built on Sept. 1, 2020, 6:38 p.m.