Package: doctest 0.4.0

David Hugh-Jones

doctest: Generate Tests from Examples Using 'roxygen' and 'testthat'

Creates 'testthat' tests from 'roxygen' examples using simple tags.

Authors:David Hugh-Jones [aut, cre]

doctest_0.4.0.tar.gz
doctest_0.4.0.zip(r-4.7)doctest_0.4.0.zip(r-4.6)doctest_0.4.0.zip(r-4.5)
doctest_0.4.0.tgz(r-4.6-any)doctest_0.4.0.tgz(r-4.5-any)
doctest_0.4.0.tar.gz(r-4.7-any)doctest_0.4.0.tar.gz(r-4.6-any)
doctest_0.4.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
doctest/json (API)
NEWS

# Install 'doctest' in R:
install.packages('doctest', repos = c('https://community.r-multiverse.org', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/hughjonesd/doctest/issues

Pkgdown/docs site:https://hughjonesd.github.io

On CRAN:

Conda:

6.45 score 31 stars 3 scripts 347 downloads 2 exports 34 dependencies

Last updated from:ef97b06623 (on v0.4.0). Checks:9 OK. Indexed: no.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK158
source / vignettesOK159
linux-release-x86_64OK190
macos-release-arm64OK89
macos-oldrel-arm64OK105
windows-develOK76
windows-releaseOK74
windows-oldrelOK80
wasm-releaseOK142

Exports:dt_roclettest_doctests

Dependencies:brewbriocallrclicommonmarkcpp11crayondescdiffobjevaluatefsgluehighrjsonliteknitrlifecyclemagrittrpkgbuildpkgloadpraiseprocessxpspurrrR6rlangroxygen2rprojroottestthatvctrswaldowithrxfunxml2yaml

Converting a package to use doctest

Rendered fromconversion.Rmdusingknitr::rmarkdownon May 26 2026.

Last update: 2025-12-04
Started: 2022-12-14

doctest

Rendered fromdoctest.Rmdusingknitr::rmarkdownon May 26 2026.

Last update: 2023-04-28
Started: 2022-11-25

Readme and manuals

Help Manual

Help pageTopics
Write testthat tests for your examples, using roxygen tagsdoctest-package doctest
Start a doctest@doctest doctest-tag
Add an example from a file@doctestExample doctestExample-tag
Create the doctest rocletdt_roclet
Create an expectation@expect expect-tag
Create an expectation as-is@expectRaw expectRaw-tag
Exclude example code from a test@omit @resume omit-tag resume-tag
Create a snapshot test@snap snap-tag
Test doctests in a packagetest_doctests
Add a line of code to the test@testRaw testRaw-tag