Previous: real-thing, Up: Writing new test cases

10.2.9 need-prt

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
     remove $s
     docommand e1 "${prt} $s" 1 IGNORE IGNORE