File: test_examples.Rd

package info (click to toggle)
r-cran-testthat 3.2.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,452 kB
  • sloc: cpp: 9,261; ansic: 37; sh: 14; makefile: 5
file content (30 lines) | stat: -rw-r--r-- 952 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/test-example.R
\name{test_examples}
\alias{test_examples}
\alias{test_rd}
\alias{test_example}
\title{Test package examples}
\usage{
test_examples(path = "../..")

test_rd(rd, title = attr(rd, "Rdfile"))

test_example(path, title = path)
}
\arguments{
\item{path}{For \code{test_examples()}, path to directory containing Rd files.
For \code{test_example()}, path to a single Rd file. Remember the working
directory for tests is \code{tests/testthat}.}

\item{rd}{A parsed Rd object, obtained from \code{\link[tools:Rdutils]{tools::Rd_db()}} or otherwise.}

\item{title}{Test title to use}
}
\description{
These helper functions make it easier to test the examples in a package.
Each example counts as one test, and it succeeds if the code runs without
an error. Generally, this is redundant with R CMD check, and is not
recommended in routine practice.
}
\keyword{internal}