The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
This vignette demonstrates a robust, idempotent
workflow for generating a roxygen2-style inventory of all
test_that() calls in one test file. The function:
test_that() as the title (without evaluating
expressions)."# -"
prefix) to roxygen markers #' @testsSection.#' @testsList and per-section listings
after each #' @testsSection.{g} (global),
{s} (section), {i} (local within section),
{l} (final line number).@testsItem blocks
immediately following listing markers are regenerated; all other code
and comments remain unchanged.paste("x", y).library(testthatdocs)
res <- document_file(
path = system.file("examples", "tests_sample_before.R", package="testthatdocs"),
section_prefix = "# -",
template = "advanced", # or "simple"
encoding = "UTF-8",
backup = TRUE,
write = TRUE
)
# Summary of tests
res$listing
# Modified test file
res$text```
The result includes:
text: the modified file as a character vector (one line
per element)listing: a data frame with columns
g, s, i, l, title_raw, section_titlewritten: whether the file was writtenbackup: backup path (if created)These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.