Re: Comments after ending plan

2006-09-14 Thread Ovid
- Original Message 
From: Michael G Schwern [EMAIL PROTECTED]

Ovid wrote:

  Which is correct?  I'm assuming that comments *are* 
  allowed after the plan?

 Comments are exempt.


Since the parser is not supposed to do anything with junk lines, I assume that 
junk after the plan is also allowed?  For right now, I'll assume it's not and 
just add support later.

ok 1
not ok 2
1..2
# this comment is acceptable
... but what about this?

Cheers,
Ovid






Re: Comments after ending plan

2006-09-14 Thread chromatic
On Wednesday 13 September 2006 23:35, Ovid wrote:

 Since the parser is not supposed to do anything with junk lines, I assume
 that junk after the plan is also allowed?  For right now, I'll assume it's
 not and just add support later.

 ok 1
 not ok 2
 1..2
 # this comment is acceptable
 ... but what about this?

Shouldn't that last line always be an error wherever it occurs?

-- c


Re: Comments after ending plan

2006-09-14 Thread Ovid
- Original Message 
From: chromatic [EMAIL PROTECTED]

  ok 1
  not ok 2
  1..2
  # this comment is acceptable
  ... but what about this?

 Shouldn't that last line always be an error wherever it occurs?

For purposes of forward compatability, it's been my understanding that the 
consensus is that junk lines are ignored but are not parse errors.  This 
ensures that that if we ever get some strange TAP v2, it won't break a parser 
for TAP v1.

Cheers,
Ovid
 
-- 
Buy the book -- http://www.oreilly.com/catalog/perlhks/
Perl and CGI -- http://users.easystreet.com/ovid/cgi_course/






Re: Comments after ending plan

2006-09-14 Thread Michael G Schwern
Ovid wrote:
 - Original Message 
 From: chromatic [EMAIL PROTECTED]
 
 ok 1
 not ok 2
 1..2
 # this comment is acceptable
 ... but what about this?
 Shouldn't that last line always be an error wherever it occurs?
 
 For purposes of forward compatability, it's been my understanding that the 
 consensus is that junk lines are ignored but are not parse errors.  This 
 ensures that that if we ever get some strange TAP v2, it won't break a parser 
 for TAP v1.

Yes, that's it.  If someone wants to make a stricter interpretation they can 
always do it on top of the parser.

And yes, unparsable crap at the end doesn't count.


Comments after ending plan

2006-09-11 Thread Ovid
I've run into a possible bug with TAPx::Parser.  According to 
http://search.cpan.org/dist/TAP/TAP.pm#The_plan:

  The plan cannot appear in the middle of the output, 
  nor can it appear more than once.

I'm getting parse errors because comments are output after the plan:

  TAPx-Parser $ perl -MTest::More=no_plan -e 'ok 0'
  not ok 1
  #   Failed test in -e at line 1.
  1..1
  # Looks like you failed 1 test of 1.

Which is correct?  I'm assuming that comments *are* allowed after the plan?  If 
so, that's a bit of work I'll have to do to correct for this.
 
Cheers,
Ovid

-- 
Buy the book -- http://www.oreilly.com/catalog/perlhks/
Perl and CGI -- http://users.easystreet.com/ovid/cgi_course/





Re: Comments after ending plan

2006-09-11 Thread Michael G Schwern

Ovid wrote:

I've run into a possible bug with TAPx::Parser.  According to 
http://search.cpan.org/dist/TAP/TAP.pm#The_plan:

  The plan cannot appear in the middle of the output, 
  nor can it appear more than once.


I'm getting parse errors because comments are output after the plan:

  TAPx-Parser $ perl -MTest::More=no_plan -e 'ok 0'
  not ok 1
  #   Failed test in -e at line 1.
  1..1
  # Looks like you failed 1 test of 1.

Which is correct?  I'm assuming that comments *are* allowed after the plan?  If 
so, that's a bit of work I'll have to do to correct for this.


Comments are exempt.