testex0.2.1 package

Add Tests to Examples

srclocs

Build a source location from a minimal numeric vector

srcref_key

Convert a srcref to a character representation

srcref_nlines

Determine the number of source code lines of a given srcref

string_newline_count

Get String Line Count

test_examples_as_testthat

Execute examples from Rd files as testthat tests

test_files

Test a list of files

testex-options

Cached retrieval of testex options from package DESCRIPTION

testex-rd-example-helpers

Rd Example Parsing Helpers

testex-roxygen-tags

testex roxygen2 tags

testex-testthat

Support for testthat Expectations

package-file-helpers

Package source file helpers

fallback_expect_no_error

Expect no Error

file_line_nchar

Return the number of characters in a line of a file

get_example_value

Determine which symbol to use by default when testing examples

is_r_cmd_check

Test whether currently executing R checks

s3_register

Register a method for a suggested dependency

split_srcref

Split a Source Reference at specific lines

as.srcref

Convert to srcref

deparse_indent

Deparse an expression and indent for pretty-printing

deparse_pretty

Deparse pretty

testex

A syntactic helper for writing quick and easy example tests

use_testex_as_testthat

Run examples as testthat expectations

use_testex

Add testex tags and configure package to fully use testex features

uses_roxygen2

Checks for use of roxygen2

vapplys

vapply shorthand alternatives

with_attached

Temporarily attach a namespace

with_srcref

Raise testthat Expectations With A Known Source Reference

wrap_expect_no_error

Wraps an example expression in a testthat expectation to not error

Add tests in-line in examples. Provides standalone functions for facilitating easier test writing in Rd files. However, a more familiar interface is provided using 'roxygen2' tags. Tools are also provided for facilitating package configuration and use with 'testthat'.

  • Maintainer: Doug Kelkhoff
  • License: MIT + file LICENSE
  • Last published: 2025-11-12