Skip Menu |
 
rt.cpan.org will be shut down on March 1st, 2021.

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)

Attachments
test_fail_simpler.patch



MIME-Version: 1.0
X-Mailer: MIME-tools 5.415 (Entity 5.415)
Subject: Simplify test_fail() Calling
Content-Type: multipart/mixed; boundary="----------=_1107285978-7635-0"
Content-Length: 0
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: iso-8859-1
Content-Length: 230
Download (untitled) / with headers
text/plain 230b
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.
Content-Type: text/x-patch; name="test_fail_simpler.patch"
Content-Disposition: inline; filename="test_fail_simpler.patch"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: iso-8859-1
Content-Length: 436
--- 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)"); }
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Message-Id: <rt-3.6.HEAD-3653-1153042720-1329.11319-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 105
Download (untitled) / with headers
text/plain 105b
This change breaks the interface of test_fail(). Try it against Test::Exception for example. Reversing.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.