tests/testthat/test-lines-of-code.R

test_that("lines_of_r_code() works", {
  x <- test_path("scripts/lines")
  expect_equal(lines_of_r_code(x), 6L)
  expect_equal(lines_of_r_code(x, skip_empty = FALSE), 13L)

  x <-  test_path("scripts/lines/lines.R")
  expect_equal(lines_of_r_code(x), 4L)
})

Try the mark package in your browser

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

mark documentation built on May 29, 2024, 5:13 a.m.