tests/testthat/test-doctest-onetime-rlang.R

# Generated by doctest: do not edit by hand
# Please edit file in R/rlang.R

test_that("Doctest: onetime-rlang", {
  # Created from @doctest for `onetime-rlang`
  # Source file: R/rlang.R
  # Source line: 11
  oo <- options(onetime.dir = tempdir(check = TRUE))
  id <- sample(10000L, 1)
  for (n in 1:3) {
    expect_warning(onetime_rlang_warn(c("rlang-style warning", i = "Extra info"),
    id = id), regexp = if (n == 1L) "rlang" else NA)
  }
  onetime_reset(id = id)
  options(oo)
})
hughjonesd/onetime documentation built on Jan. 24, 2025, 2:49 p.m.