The documentation says that a "." is printed for each
successful test execution while an "F" is printed for
each failed test execution.
Test-Unit-0.13/examples/procedural-fail-example.pl
has the output
..F
when it should have the output:
.F
here is a complete capture of my running of the test:
================= begin capture
jcano@apple [64:2] > perl -I ../lib
procedural-fail-example.pl
..F
Time: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00
CPU)
!!!FAILURES!!!
Test Results:
Run: 2 Failures: 1 Errors: 0
There was 1 failure:
1) test_fail(Test::Unit::TestCase::Load1_Anonymous2):
Born to lose ...
Level 1: in package 'Test::Unit::Assert', file
'../lib/Test/Unit/Assert.pm', at line '9', sub
'Test::Unit::Assert::fail'
Level 2: in package 'Test::Unit', file
'../lib/Test/Unit.pm', at line '35', sub
'Test::Unit::Assert::assert'
Level 3: in package 'main', file
'procedural-fail-example.pl', at line '14', sub
'Test::Unit::assert'
Level 4: in package
'Test::Unit::TestCase::Load1_Anonymous2', file '(eval
6)', at line '6', sub 'main::test_fail'
Level 5: in package 'Test::Unit::TestCase', file
'../lib/Test/Unit/TestCase.pm', at line '65', sub
'Test::Unit::TestCase::Load1_Anonymous2::test_fail'
Level 6: in package 'Test::Unit::TestCase', file
'../lib/Test/Unit/TestCase.pm', at line '45', sub
'Test::Unit::TestCase::run_test'
Level 7: in package 'Test::Unit::TestCase', file
'../lib/Test/Unit/TestCase.pm', at line '44', sub
'(eval)'
Level 8: in package 'Test::Unit::TestResult', file
'../lib/Test/Unit/TestResult.pm', at line '100', sub
'Test::Unit::TestCase::run_bare'
Level 9: in package 'Test::Unit::TestResult', file
'../lib/Test/Unit/TestResult.pm', at line '99', sub
'(eval)'
Level 10: in package 'Test::Unit::TestCase', file
'../lib/Test/Unit/TestCase.pm', at line '36', sub
'Test::Unit::TestResult::run'
Level 11: in package 'Test::Unit::TestSuite', file
'../lib/Test/Unit/TestSuite.pm', at line '157', sub
'Test::Unit::TestCase::run'
Level 12: in package 'Test::Unit::TestRunner', file
'../lib/Test/Unit/TestRunner.pm', at line '58', sub
'Test::Unit::TestSuite::run'
Level 13: in package 'Test::Unit', file
'../lib/Test/Unit.pm', at line '87', sub
'Test::Unit::TestRunner::do_run'
Level 14: in package 'main', file
'procedural-fail-example.pl', at line '28', sub
'Test::Unit::run_suite'
Test was not successful.
jcano@apple [65:2] > pwd
/home/jcano/xp/Test-Unit-0.13/examples
================= end capture
Logged In: NO
I think I fixed the problem. Since I don't know how to use
CVS, I'll just
provide you with the diffs:
There is only one small change:
Test/Unit/TestRunner.pm
*** TestRunner.pm 2001/03/06 04:45:54 1.1
--- TestRunner.pm 2001/03/06 04:48:02
***************
*** 41,47 ****
}
sub add_pass {
! # in this runner passes are ignored.
}
sub create_test_result {
--- 41,48 ----
}
sub add_pass {
! my $self = shift;
! $self->_print(".");
}
sub create_test_result {
***************
*** 199,205 ****
sub start_test {
my $self = shift;
my ($test) = @_;
- $self->_print(".");
}
1;
--- 200,205 ----
cheers,
--jfc