tests/testthat/test-tag.R

test_that("warn about unknown tags", {
  block <- "
    #' @unknown
    foo <- function() {}
  "
  expect_snapshot(. <- roc_proc_text(rd_roclet(), block))
})

test_that("incomplete rd in prequel or tag raises issue", {
  block <- "
    #' Title {
    #' @aliases title{
    x <- 1
  "
  expect_snapshot(out <- roc_proc_text(rd_roclet(), block))
  expect_equal(out[[1]]$get_value("title"), "")
  expect_equal(out[[1]]$get_value("alias"), "x")
})

Try the roxygen2 package in your browser

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

roxygen2 documentation built on Aug. 5, 2026, 1:06 a.m.