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)
})

Try the onetime package in your browser

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

onetime documentation built on Sept. 3, 2023, 9:06 a.m.