tests/testthat/test-auto_clean.R

test_that("auto_clean deletes files on gc()", {
  tmp <- tempfile()
  writeLines("abc", tmp)

  auto_clean(tmp)
  gc()

  expect_false(file.exists(tmp))
})

Try the rcmdcheck package in your browser

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

rcmdcheck documentation built on Sept. 27, 2021, 5:13 p.m.