Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

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

Report information
The Basics
Id: 51535
Status: resolved
Priority: 0/
Queue: Test-Synopsis

People
Owner: Nobody in particular
Requestors: user42 [...] zip.com.au
Cc:
AdminCc:

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



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.
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 ]
Resolved in version 0.7 which is now on CPAN: https://metacpan.org/release/ZOFFIX/Test-Synopsis-0.07 -- Cheers, ZZ [ https://metacpan.org/author/ZOFFIX ]