tests/testthat/test-utils-warn.R

test_that("warn_roxy_function works when fun doesn't have a srcref", {
  fun <- zap_srcref(function() {})

  expect_snapshot(warn_roxy_function(fun, "test message"))
})

Try the roxygen2 package in your browser

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

roxygen2 documentation built on May 1, 2026, 5:06 p.m.