setup: Support functions for package scriptests

Description Usage Arguments Details Value Author(s)

Description

These are support functions for package scriptests. They are called to prepare a test directory for running tests, compare the output of each test with target out, and summarize test results.

Usage

1
2
3
4
5
ScripDiff(commandfile, outfile = NULL, savefile = NULL,
          debug = FALSE, R.suf = "R")
initializeTests(debug = FALSE, create.Rout.save = FALSE,
                addSelfCheck = FALSE, pattern = NULL, subst = NULL, R.suf = "R")
summarizeTests(debug = FALSE)

Arguments

commandfile

The name of the file containing R commands.

outfile

The name of the file containing R output.

savefile

The name of the file containing pre-existing R output to compare against.

debug

Debugging flag.

create.Rout.save

Should a .Rout.save file be created. Default is FALSE.

addSelfCheck

Controls an unused an obselete feature of adding extra code to the end of the R commands that will check the output created.

pattern

Only process test files whose name matches pattern

subst

Substitutions to make when parsing the transcript file.

R.suf

The suffix (not including a dot) to use for auto-generated files containing R commands.

Details

initializeTests

Pre-process tests, writing commands to a file, and creating a file with a saved R object containing information to analyze the results of the test.

ScripDiff

Compare test output against desired output and summarize the differences.

summarizeTests

Summarize the results of all tests.

Value

Returns the value 0 on successful completion.

Author(s)

Tony Plate tplate@acm.org


scriptests documentation built on May 2, 2019, 4:28 p.m.