/
test.Rd
33 lines (30 loc) · 1.14 KB
/
test.Rd
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
31
32
% Generated by roxygen2 (4.0.0): do not edit by hand
\name{test}
\alias{test}
\title{Execute all \pkg{test_that} tests in a package.}
\usage{
test(pkg = ".", filter = NULL, fresh = FALSE)
}
\arguments{
\item{pkg}{package description, can be path or package
name. See \code{\link{as.package}} for more information}
\item{filter}{If not \code{NULL}, only tests with file
names matching this regular expression will be executed.
Matching will take on the file name after it has been
stripped of \code{"test-"} and \code{".r"}.}
\item{fresh}{if \code{TRUE}, will be run in a fresh R
session. This has the advantage that there's no way the
examples can depend on anything in the current session,
but interactive code (like \code{\link{browser}}) won't
work.}
}
\description{
Tests are assumed to be located in a \code{inst/tests/} directory.
See \code{\link[testthat]{test_dir}} for the naming convention of test
scripts within that directory.
}
\details{
If no testing infrastructure is present, you'll be asked if you want
devtools to create it for you (in interactive sessions only). See
\code{\link{add_test_infrastructure}} for more details.
}