Chapter 4
If one of the tests has failures, then the output will look like the following:
$ make test
PERL_DL_NONLAZY=1 /usr/local/bin/perl Iblib/arch Iblib/lib \
I/usr/local/lib/perl5/5.6.1/i686 linux I/usr/local/lib/perl5/5.6.1 \
e use Test::Harness qw(&runtests $verbose); $verbose=0; runtests @ARGV; t/*.t
t/01load......ok
t/02basic.....FAILED test 2
Failed 1/2 tests, 50.00% okay
t/03errors....ok
Failed Test Stat Wstat Total Fail Failed List of Failed
t/02basic.t 2 1 50.00% 2
Failed 1/3 test scripts, 66.67% okay. 1/6 subtests failed, 83.33% okay.
Here test number 2 in t/02basic.t has failed. The test output is clear enough, but it
doesn't include any line numbers. To get the actual output from each of the test
scripts, you can add the TEST_VERBOSE=1 option to the make test run:
$ make test TEST_VERBOSE=1
PERL_DL_NONLAZY=1 /usr/local/bin/perl Iblib/arch Iblib/lib \
I/usr/local/lib/perl5/5.6.1/i686 linux I/usr/local/lib/perl5/5.6.1 \
e use Test::Harness qw(&runtests $verbose); $verbose=1; runtests @ARGV; t/*.t
t/01load......1..1
ok 1
ok
t/02basic.....1..2
ok 1
not ok 2
# Failed test 2 in t/02basic.t at line 5
FAILED test 2
Failed 1/2 tests, 50.00% okay
t/03errors....1..3
ok 1
ok 2
ok 3
ok
Failed Test Stat Wstat Total Fail Failed List of Failed
t/02basic.t 2 1 50.00% 2
Failed 1/3 test scripts, 66.67% okay. 1/6 subtests failed, 83.33% okay.
Now the filename and line number where the test failed is visible t/02basic.t,
line 5.
114
footer
Our partners:
PHP: Hypertext Preprocessor Best Web Hosting
Java Web Hosting
Inexpensive Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Jsp Hosting
Cheap Hosting
Visionwebhosting.net Business web hosting division of Web
Design Plus. All rights reserved