Next | Automated Testing | 27 |
By convention, Perl test programs print an output like this:
1..34 ok 1 ok 2 not ok 3 ok 4 ... ok 34
Any program that does this will work with Test::Harness
#!perl
no punctuation; print "1..14161\n";
for (1..14161) { print "ok $_\n"; }
Comments are OK too:
# Now test the widget unification feature ok 4 # null widget works OK not ok 3 # expected "37", got "119"
The word "skipped" is special in comments
It means that the test was omitted for some reason
# Now test whether it works when the input is a pipe ok 12 # skipped - Windows systems have no pipes ok 13 # skipped - Windows systems have no pipes
If the initial line is 1..0, the entire file wants to be skipped
See Test::Harness for details
Next | Copyright © 2004 Mark Dominus |