Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

find_test_scripts

Find test files


Description

Find test files

Usage

find_test_scripts(
  path,
  filter = NULL,
  invert = FALSE,
  ...,
  full.names = TRUE,
  start_first = NULL
)

Arguments

path

path to tests

filter

If not NULL, only tests with file names matching this regular expression will be executed. Matching is performed on the file name after it's stripped of "test-" and ".R".

invert

If TRUE return files which don't match.

...

Additional arguments passed to grepl() to control filtering.

start_first

A character vector of file patterns (globs, see utils::glob2rx()). The patterns are for the file names (base names), not for the whole paths. testthat starts the files matching the first pattern first, then the ones matching the second, etc. and then the rest of the files, alphabetically. Parallel tests tend to finish quicker if you start the slowest files first. NULL means alphabetical order.

Value

A character vector of paths


testthat

Unit Testing for R

v3.0.2
MIT + file LICENSE
Authors
Hadley Wickham [aut, cre], RStudio [cph, fnd], R Core team [ctb] (Implementation of utils::recover())
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.