Previous: real-thing, Up: Writing new test cases [Contents][Index]
The possible non-availability of prt is another thing that the
CSSC test suite needs to know about in order to run successfully
against all working versions of SCCS. Some versions of SCCS
lack the prt program. For this reason, the tests for this tool
(in the tests/prt directory) are skipped if prt is
missing. When writing test scripts, you should never use prt
unless you are actually testing prt itself (you can almost
always use prs instead).
If your test is specifically designed to test the functionality of
prt itself on the other hand, just source need-prt
before the first test. The need-prt script will skip the
remainder of the invoking test script if prt is missing. You
might use it like this, for example :-
#! /bin/sh
. ../common/test-common
. ../common/need-prt
s=s.testfile
remove $s
docommand e1 "${prt} $s" 1 IGNORE IGNORE
success