.TH CHECK 1 .SH NAME check \- check that regression tests pass .SH SYNOPSIS .B check [ .B -v ] [ .I prog [ .I file | .I dir ] ] .SH DESCRIPTION .I Check is an rc script that performs regression testing for a program. It sends input files to the program .I prog (by default .B 8.out ) and compares its output with that of previous runs. It is usual to have one input file per program test. Input files must have names that start with a digit and do not have .B .out or .B .new suffixes. .PP Check executes the program just for .IR file , if given as an argument. It checks all input files in .I dir if given, and all input files in the current directory otherwise. .PP The first time a test is run, it is considered to pass and its output is kept in a file named like the input file but terminated in .BR .out . When a check fails the new output (which differs from the .B .out file) is kept in a file for inspection. This file has the same name of the input file terminated in .BR .new . .PP Input files may contain arbitrary text. Lines starting with .B # are ignored and lines starting with .B #! are executed before starting the check of the input file. This mechanism can be used to prepare the environment for the check. Option .B -v makes the program output more verbose. .PP If the first line of an input file is a comment, check considers that it contains a one-line description of the test performed by the file. That description is printed when the test is run. .SH SOURCE .B /rc/bin/check .SH BUGS Binary input files are not handled properly.