Skip Menu |

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

Report information
The Basics
Id: 39031
Status: resolved
Priority: 0/
Queue: Test-Harness

People
Owner: andy [...] hexten.net
Requestors: ANDK [...] cpan.org
Cc:
AdminCc:

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



Subject: regression: skip parsing does not detect reasonwith "# Skip:"
Somewhere between 3.09 and 3.13 the parsing of skip lines changed. The following is in my test file: BEGIN { print "1..0 # Skip: test only run when called with --doit\n"; } Parsed by 3.09 gives: t/14forkbomb......skipped: test only run when called with --doit But 3.13: t/14forkbomb....skipped: (no reason given) I just read the spec and I'd say this is a bug in TH now. I've checked current SVN and it's still the same. Thanks,
Hi Andreas, On Sat Sep 06 02:05:09 2008, ANDK wrote: Show quoted text
> Somewhere between 3.09 and 3.13 the parsing of skip lines changed. The > following is in my test file: > BEGIN { > print "1..0 # Skip: test only run when called with --doit\n"; > } > > Parsed by 3.09 gives: > t/14forkbomb......skipped: test only run when called with --doit > > > But 3.13: > t/14forkbomb....skipped: (no reason given) > > > I just read the spec and I'd say this is a bug in TH now. I've checked > current SVN and it's still the same. > > Thanks,
That's because a skip plan is supposed to look like 1..0 # SKIP I can't go on like this... We decided that if the skip syntax wasn't quite right we'd still skip but couldn't reliably extract the description (because people do things like # Skipping ...)
CC: ANDK [...] cpan.org
Subject: Re: [rt.cpan.org #39031] regression: skip parsing does not detect reasonwith "# Skip:"
Date: Sat, 13 Sep 2008 22:12:35 +0200
To: bug-Test-Harness [...] rt.cpan.org
From: andreas.koenig.7os6VVqR [...] franz.ak.mind.de (Andreas J. Koenig)
Show quoted text
>>>>> On Sat, 13 Sep 2008 09:36:45 -0400, "Andy Armstrong via RT" <bug-Test-Harness@rt.cpan.org> said:
Show quoted text
Show quoted text
> On Sat Sep 06 02:05:09 2008, ANDK wrote:
>> Somewhere between 3.09 and 3.13 the parsing of skip lines changed. The >> following is in my test file: >> BEGIN { >> print "1..0 # Skip: test only run when called with --doit\n"; >> } >> >> Parsed by 3.09 gives: >> t/14forkbomb......skipped: test only run when called with --doit >> >> >> But 3.13: >> t/14forkbomb....skipped: (no reason given) >> >> >> I just read the spec and I'd say this is a bug in TH now. I've checked >> current SVN and it's still the same. >> >> Thanks,
Show quoted text
> That's because a skip plan is supposed to look like
Show quoted text
> 1..0 # SKIP I can't go on like this...
Show quoted text
> We decided that if the skip syntax wasn't quite right we'd still skip but couldn't reliably > extract the description (because people do things like # Skipping ...)
I cannot help but this is the wording of the TAP spec and I cannot read your interpretation out of it. So please fix the abmiguous wording. Skipping tests If the directive starts with # SKIP, the test is counted as having To support you wording, this would have to be something like: ...starts with /^# skip /i ... been skipped. If the whole test file succeeds, the count of skipped tests is included in the generated output. The harness should report the text after # SKIP\S*\s+ as a reason for Look here, suddenly the spec does know about regular expressions but to a different result than above and not yet telling anything about case sensitivity. skipping. ok 23 # skip Insufficient flogiston pressure. And now the spec reveals that there is case insensitivity. Similarly, one can include an explanation in a plan line, emitted if the test file is skipped completely: 1..0 # Skipped: WWW::Mechanize not installed And now the confusion is perfect and the spec lets shine through that other words than "skip" itself are allowed. Could you please bring spec and code in accordance? -- andreas
Subject: Re: [rt.cpan.org #39031] regression: skip parsing does not detect reasonwith "# Skip:"
Date: Sat, 13 Sep 2008 15:01:14 -0700
To: bug-Test-Harness [...] rt.cpan.org
From: Michael G Schwern <schwern [...] pobox.com>
(Andreas J. Koenig) via RT wrote: Show quoted text
> And now the confusion is perfect and the spec lets shine through that > other words than "skip" itself are allowed. > > Could you please bring spec and code in accordance?
That "spec" is really "what Test::Harness 2 did". Dropping all those special cases from the TAP spec makes sense, I'm sure it was just a quirk of how the skip match regex was written. But TH3 should keep compatibility with what TH2 did and so handle the old styles. Throw a warning if necessary. -- 54. "Napalm sticks to kids" is *not* a motivational phrase. -- The 213 Things Skippy Is No Longer Allowed To Do In The U.S. Army http://skippyslist.com/list/
On Sat Sep 13 15:01:42 2008, schwern@pobox.com wrote: Show quoted text
> That "spec" is really "what Test::Harness 2 did". Dropping all those > special > cases from the TAP spec makes sense, I'm sure it was just a quirk of > how the > skip match regex was written. But TH3 should keep compatibility with > what TH2 > did and so handle the old styles. Throw a warning if necessary.
We could restore the old behaviour for TAP < 13 and only get strict if we're parsing TAP 13+. Any problems with that?
I've restored the old skip parsing semantics as of [1308]. Thanks Andreas.