Subject: | Simplify test_fail() Calling |
This patch allows calling test_fail() without explicitly expecting failure output ("not ok 1") with test_out(). It doesn't change the documentation, but it does make testing slightly more convenient by hiding unnecessary details.
--- lib/Test/Builder/Tester.pm~ 2005-01-29 13:40:10.000000000 -0800
+++ lib/Test/Builder/Tester.pm 2005-01-29 14:23:08.000000000 -0800
@@ -238,10 +238,4 @@
my ($package, $filename, $line) = caller;
$line = $line + (shift() || 0); # prevent warnings
+ my $mess = 'not ok 1';
+ $mess .= ' - ' . shift if @_;
+ $out->expect( $mess );
+
# expect that on stderr
$err->expect("# Failed test ($0 at line $line)");
}