Skip Menu |
 

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

Report information
The Basics
Id: 380
Status: stalled
Priority: 0/
Queue: Test-Builder-Tester

People
Owner: MARKF [...] cpan.org
Requestors: mark [...] twoshortplanks.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.07
Fixed in: 0.07



Subject: Use of regular expressions in test declarations
Download (untitled) / with headers
text/plain 743b
Adrian Howard writes: Possible suggestion for improvement... it would be cool if you could pass regular expressions to the various test_* routines so instead of: my $SIMPLE = Local::Error::Simple->new(); test_out("not ok 1"); test_fail(+3); test_err("# expecting: Local::Error::Test exception"); test_err("# found: $SIMPLE"); throws_ok { error("simple") } "Local::Error::Test"; test_test("throws_ok: bad sub-class match detected"); you could do test_out("not ok 1"); test_fail(+3); test_err("# expecting: Local::Error::Test exception"); test_err(qr/$# found: Local::Error::Test/); throws_ok { error("simple") } "Local::Error::Test"; test_test("throws_ok: bad sub-class match detected");


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.