R: Test package examples

test_examples {testthat} | R Documentation

## Test package examples

### 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.

### Usage

    test_examples(path = "../..")

    test_example(path)

    test_rd(rd)

### Arguments

`path` | For `test_examples()`, path to directory containing Rd files. For `test_example()`, path to a single Rd file. Remember the working directory for tests is `tests/testthat`.
`rd` | A parsed Rd object, obtained from `tools::Rd_db()` or otherwise.

[Package testthat version 2.0.1 Index]