[tapx-dev] Trailing backslash in TAP lines

Andy Armstrong andy at hexten.net
Thu Jul 12 23:18:25 BST 2007


Ovid wrote:
> ----- Original Message ----
> From: Steffen Schwigon <schwigon at webit.de>
> 
>> Should I correct my test output or should TAP::Parser handle lines
>> with trailing backslash differently?
> 
> I think that TAP::Parser's behavior is incorrect.  The problem will be found in the TAP::Parser::Grammar, specifically this line, I think, which is supposed to allow a hash mark if it's escaped:
> 
>   my $description = qr/.*?(?!\\(?:\\\\)*)#?/;

I'm wondering having explicit support for escaped hashes is a good idea.

If you allow \# as # then you also have to support \\ for \ - so you can
encode \# as \\\#. Given that the directive only parses if it matches

 /\# \s* (?i:SKIP|TODO)/

anyway d'you think we really need to support escaping the hash?

The current tests all pass without support for escaped hashes - so I
assume it's not a regression to drop it? Test::Harness doesn't support
escaping does it?

-- 
Andy Armstrong, Hexten


More information about the tapx-dev mailing list