Skip Menu |

This queue is for tickets about the Test-Builder-Tester CPAN distribution.

Report information
The Basics
Id: 11319
Status: open
Priority: 0/
Queue: Test-Builder-Tester

People
Owner: Nobody in particular
Requestors: chromatic [...] wgz.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



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)"); }
This change breaks the interface of test_fail(). Try it against Test::Exception for example. Reversing.