tests/testthat/test-unit-import-standalone-rappdirs.R

# Standalone file: do not edit by hand
# Generated by: pkgtools from @unit tags
# ----------------------------------------------------------------------
library(rsurvstat)

# unit test start: rappdirs_user_cache_dir ----

test_that("rappdirs_user_cache_dir unit test", {

  # Automatically generated test case from roxygen @unit tag
  # Do not edit here - follow the link to the source file.
  # or navigate to topic with <F2>
  F2 = rappdirs_user_cache_dir
  

  testthat::expect_no_error(withCallingHandlers(
    {
      rappdirs_user_cache_dir("rappdirs")
    },
    warning = function(e) {
      message("Warning issued: ", e$message)
      invokeRestart("muffleWarning")
    }
  ))

  # generates a failure if the overall test is failing with a link to the 
  # source of the unit test:
  testthat::expect(rlang::caller_env(n = 2)$ok,
    failure_message = "Source link for failing @unit test.",
    srcref = srcref(srcfile("../../R/import-standalone-rappdirs.R"), c(78, 1, 78+1, 1))
  )
})

# unit test end: rappdirs_user_cache_dir ----
# end of unit tests ----

Try the rsurvstat package in your browser

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

rsurvstat documentation built on Feb. 20, 2026, 5:09 p.m.