tests/testthat/test-invalid-tif.R

test_that("TIFF tag error handling works", {
  tmp_corrupt <- tempfile(fileext = ".tif")
  writeLines("not a tiff file", tmp_corrupt)
  suppressWarnings(expect_error(read_tif(tmp_corrupt, msg = FALSE)))
  fs::file_delete(tmp_corrupt)
})
ropensci/ijtiff documentation built on July 4, 2025, 3:50 a.m.