- or download this
use strictures;
use Test::More;
# plan test count here or use done_testing($count).
...
sub get_number {
int(rand(1000));
}
- or download this
~>prove my-test.t -v
ok 1 - Hello world is hello world
ok 2 - get_number() returns greater than zero
...
Failed test: 3
Files=1, Tests=3, 0 wallclock secs ( 0.03 usr 0.01 sys + 0.03 cusr
+ 0.00 csys = 0.07 CPU)
Result: FAIL
- or download this
ok 1 - Hello world is hello world
ok 2 - get_number() returns greater than zero
ok 1 - get_number() returns greater than zero
...
All tests successful.
Files=1, Tests=3, 0 wallclock secs ( 0.03 usr 0.01 sys + 0.03 cusr
+ 0.00 csys = 0.07 CPU)
Result: PASS