tests/testthat/_snaps/tag-doctestExample.md

@doctestExample

# Generated by doctest: do not edit by hand
# Please edit file in R/<text>

test_that("example from a file", {
  # Created from @doctest for `foo`
  # Source file: <text>
  # Source line: 4
  expect_equal(1 + 1, 2)
})
$foo.Rd
% Generated by roxygen2: do not edit by hand
% Please edit documentation in ./<text>
\name{foo}
\alias{foo}
\title{Title}
\usage{
foo()
}
\description{
Title
}
\examples{
1 + 1

some_code_that_might_go_in_an_example()
}


Try the doctest package in your browser

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

doctest documentation built on May 29, 2024, 7:09 a.m.