tests/testthat/test_dev.R

test_that("endian is always present", {

  skip_on_cran()

  expect_true({
    r_files <- list.files("../../R", full.names = TRUE)
    all(vapply(r_files, function(f) {
      content <- readLines(f)
      rb_frags <- grep("readBin", content, value = TRUE)
      none_missing <- isTRUE(all(grepl("endian", rb_frags)))
    }, logical(1)))
  })

})

Try the lightr package in your browser

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

lightr documentation built on May 14, 2022, 5:05 p.m.