tests/testthat/test-zzz.R

# mostly for the test coverage
test_that(".onDetach", {
  old <- is_loaders_hack_installed()
  if (old) on.exit(hack_r_loaders(), add = TRUE)
  
  ###
  hack_r_loaders()

  .onDetach('dummy')

  expect_false(is_loaders_hack_installed())
})

Try the srcpkgs package in your browser

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

srcpkgs documentation built on May 29, 2024, 6:43 a.m.