Sat Nov 14 17:18:17 2009user42 [...] zip.com.au - Ticket created
Subject:
show failing code on error
Date:
Sun, 15 Nov 2009 09:16:57 +1100
To:
bug-Test-Synopsis [...] rt.cpan.org
From:
Kevin Ryde <user42 [...] zip.com.au>
As a suggestion, it'd be good if Test::Synopsis showed the failing chunk
of code when it gets an error.
I'm not sure if it'd be best worked into the "name" part of the failing
test, like (untested!)
$test->ok(0,"$error\n on code:\n$code")
or as merely as a
diag $code
Either way it'd let you see how the wrapping and any extra "=for" stuff
has come out.
Tue Feb 04 15:20:45 2014cpan [...] zoffix.com - Status changed from 'new' to 'patched'
Tue Feb 04 15:23:08 2014cpan [...] zoffix.com - Correspondence added
Implemented this as an optional feature requiring specifying an argument to all_synopsis_ok() sub.
Doing this by default is a bit too much and might be confusing to those who're not expecting code wrapped in a `sub {}`; however, the feature is useful, as it allows copy/pasting the code and playing with it (something I had to do a lot with my POE code, trying to find confusing errors).
Patched version is in the repo (zoffix/fix-all-RT-bugs branch); Will make a release soon.
--
Cheers,
ZZ [ https://metacpan.org/author/ZOFFIX ]
Tue Feb 04 22:23:52 2014cpan [...] zoffix.com - Correspondence added