File: source_file.Rd

package info (click to toggle)
r-cran-testthat 3.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,996 kB
  • sloc: cpp: 9,265; ansic: 37; sh: 15; makefile: 5
file content (42 lines) | stat: -rw-r--r-- 1,148 bytes parent folder | download | duplicates (2)
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
33
34
35
36
37
38
39
40
41
42
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/source.R
\name{source_file}
\alias{source_file}
\alias{source_dir}
\alias{source_test_helpers}
\alias{source_test_setup}
\alias{source_test_teardown}
\title{Source a file, directory of files, or various important subsets}
\usage{
source_file(path, env = test_env(), chdir = TRUE, wrap = TRUE)

source_dir(
  path,
  pattern = "\\\\.[rR]$",
  env = test_env(),
  chdir = TRUE,
  wrap = TRUE
)

source_test_helpers(path = "tests/testthat", env = test_env())

source_test_setup(path = "tests/testthat", env = test_env())

source_test_teardown(path = "tests/testthat", env = test_env())
}
\arguments{
\item{path}{Path to files.}

\item{env}{Environment in which to evaluate code.}

\item{chdir}{Change working directory to \code{dirname(path)}?}

\item{wrap}{Automatically wrap all code within \code{\link[=test_that]{test_that()}}? This ensures
that all expectations are reported, even if outside a test block.}

\item{pattern}{Regular expression used to filter files.}
}
\description{
These are used by \code{\link[=test_dir]{test_dir()}} and friends
}
\keyword{internal}