Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

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

Report information
The Basics
Id: 20639
Status: resolved
Priority: 0/
Queue: Test-Simple

People
Owner: Nobody in particular
Requestors: LGODDARD [...] cpan.org
Cc:
AdminCc:

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



Subject: Line number format differs from Perl default, inhibits editors' exe-to-source links
not ok 109 - [HTTP 400 http://PC- L438542/audioannotation/api/programmes/62/segments] # Failed test (TestBase.pm at line 232) # got: '400' # expected: '200' # 400 OK # called at D:\wc\t\413_Seg_Tag_Cases.t line 248. I would rather that last line conformed to the standard perl output, since all my editors' have a regex that takes that format to link the executed script's output and link it to the source code. Please....?!
On Mon Jul 24 05:29:40 2006, LGODDARD wrote: Show quoted text
> not ok 109 - [HTTP 400 http://PC- > L438542/audioannotation/api/programmes/62/segments] > # Failed test (TestBase.pm at line 232) > # got: '400' > # expected: '200' > # 400 OK > # called at D:\wc\t\413_Seg_Tag_Cases.t line 248. > > I would rather that last line conformed to the standard perl output, > since all my editors' have a regex that takes that format to link the > executed script's output and link it to the source code. > > Please....?!
That "called at" line is not output by Test::More. Whatever that output came from probably called Test::More::is() or Test::Builder->is_eq() and then added their own diagnostics on the end. Without some context I can't help anymore. Looks like you've got the wrong man.
Subject: Re: [rt.cpan.org #20639] Line number format differs from Perl default, inhibits editors' exe-to-source links
Date: Sun, 06 Aug 2006 20:00:03 +0100
To: bug-Test-Simple [...] rt.cpan.org
From: Lee Goddard <lee [...] leegoddard.net>
Michael_G_Schwern via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=20639 > > > On Mon Jul 24 05:29:40 2006, LGODDARD wrote: >
>> not ok 109 - [HTTP 400 http://PC- >> L438542/audioannotation/api/programmes/62/segments] >> # Failed test (TestBase.pm at line 232) >> # got: '400' >> # expected: '200' >> # 400 OK >> # called at D:\wc\t\413_Seg_Tag_Cases.t line 248. >> >> I would rather that last line conformed to the standard perl output, >> since all my editors' have a regex that takes that format to link the >> executed script's output and link it to the source code. >> >> Please....?! >>
> > That "called at" line is not output by Test::More. Whatever that output > came from probably called Test::More::is() or Test::Builder->is_eq() and > then added their own diagnostics on the end. Without some context I > can't help anymore. > > Looks like you've got the wrong man. > >
Sorry, my dear fellow; I appear to have sent you the wrong sample output. As I was generating the sample I got the following: You tried to run a test without a plan! Gotta have a plan. at C:/perl58/lib/Test/More.pm line 263 # Looks like your test died before it could output anything. I understand the error message, and why it occurred -- I've been using your excellent module for years. BUt what alwyas irks me, over the years, is that the error message appears to come from Test::More's 263 line. Should it not, in fact, apoint blame to the package which mis-called Test::More? Anyway, back to the matter at hand: to illustrate my point, which I will reiterate below, please consider the following code: use Test::More 'no_plan'; fail('Thanks'); The result of fail is a very useful message: # Failed test 'Thanks' # in C:\temp.pl at line 2. Useful to me, but not to my text editor, which is so useless it can only handle one regular expression at a time, which it uses to match error reports in STDERR/STDOUT from scripts and programmes. ^.+at \(.+\) line \([0-9]+\)[.,]? That's what most of the editor's users use at the moment, to match against Perl's error reporting format. Would it be an awful hassle to have Test::More output in the same way? Is it even Test::More doing the output, or is that Test::Builder? Perhaps I should have checked the code before writing.... Cheers lee

Message body is not shown because sender requested not to inline it.

On Sun Aug 06 15:00:28 2006, west.finchley@leegoddard.net wrote: Show quoted text
> As I was generating the sample I got the following: > > You tried to run a test without a plan! Gotta have a plan. at > C:/perl58/lib/Test/More.pm line 263 > # Looks like your test died before it could output anything. > > I understand the error message, and why it occurred -- I've been using > your excellent module for years. BUt what alwyas irks me, over the > years, is that the error message appears to come from Test::More's 263 > line. Should it not, in fact, apoint blame to the package which > mis-called Test::More?
You're right, it should. And as I'm in a hacking mood I've fixed that and all the other "die" messages in Test::Builder. Show quoted text
> The result of fail is a very useful message: > > # Failed test 'Thanks' > # in C:\temp.pl at line 2. > > Useful to me, but not to my text editor, which is so useless it can only > handle one regular expression at a time, which it uses to match error > reports in STDERR/STDOUT from scripts and programmes. > > ^.+at \(.+\) line \([0-9]+\)[.,]? > > That's what most of the editor's users use at the moment, to match > against Perl's error reporting format. > > Would it be an awful hassle to have Test::More output in the same way? > Is it even Test::More doing the output, or is that Test::Builder? > Perhaps I should have checked the code before writing....
(Its in Test::Builder, nearly everything is) I cringed at the thought of changing the tests to match a different diagnostic format, not to mention the potential damage to Test::Builder::Tester, but it was surprisingly easy with a few clever search and replaces. These will appear in the next release.