[tap-l] questions regarding draft standard compliance

Ovid publiustemp-tapx at yahoo.com
Fri Aug 27 14:42:41 BST 2010


----- Original Message ----
> From: EBo <ebo at users.sourceforge.net>


> 1) is  the draft standard for the SKIP and TODO directives to be  case
> sensitive?


They should not be case-sensitive.  As a general rule of thumb (there are 
exceptions), if the standard deviates from the behaviour of Test::Harness, it 
means the standard needs to be corrected.  This is because we have, on several 
occasions, discovered that the official Test::Harness for Perl has, for years, 
permitted unexpected behaviour.  Thus, we tend to say that the code is the 
actual standard in order to avoid breaking backwards-compatibility.

In this case, you can look at the code for the grammar:

  http://cpansearch.perl.org/src/ANDYA/Test-Harness-3.22/lib/TAP/Parser/Grammar.pm


And you should note the following:

                if ($desc =~ m/^ ( [^\\\#]* (?: \\. [^\\\#]* )* )
                       \# \s* (SKIP|TODO) \b \s* (.*) $/ix
                  )
                {
                    ( $desc, $dir, $explanation ) = ( $1, $2, $3 );
                }

That clearly shows that the directives are case-insensitive ("TodO" is allowed, 
for example) and even the space between the hash (#) and the directive is 
optional (though it's interesting that no space is required after.  "not ok 1 
#TodO-whee!" is a valid TODO test. I think I wrote that regex, so this might be 
my fault).

Still, it's better to ask if you're in doubt.

> 2) Should I report here, to tap-l, discrepancies from  Test-Harness
> divinations from the draft standard?  Or should I take that  off-list to
> the
> maintainers?  The case in point is a descriptive  string in Test-Harness
> which is not Safe-String compliant.  Normally, I  would take this directly
> to the maintainers, but it is my understanding that  Test-Harness is the
> exemplar for the IETF draft standard, and thought these  issues fodder for
> general discussion.


I don't mind seeing the discussion here, though there's also an IETF 
list: tap at ietf.org
 
Cheers,
Ovid

--Buy the book - http://www.oreilly.com/catalog/perlhks/
Tech blog - http://blogs.perl.org/users/ovid/
Twitter - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6




More information about the tap-l mailing list