develooper Front page | perl.perl6.compiler | Postings from December 2004

Re: When converting tests...

Thread Previous
From:
Patrick R. Michaud
Date:
December 20, 2004 13:12
Subject:
Re: When converting tests...
Message ID:
20041220211224.GB18128@contra.vosn.net
On Mon, Dec 20, 2004 at 05:27:37PM +0200, Markus Laire wrote:
> How should I convert dot, $, ...
> 
> 1# p5: "abc"  =~ /a.c/;  (match)
> 2# p5: "a\nc" =~ /a.c/;  (no match)
> 
> Equivalent code for '.' would now be '\N'. Still there are tests where I 
> could just leave the dot alone (e.g. all tests where there is no \n in 
> target-string.)

These are cases where I think the p5 tests each need to become
multiple tests in the p6rules suite.  The above tests probably should 
go into the p6rules suite as

   "abc"   /a.c/   (match)
   "a\nc"  /a.c/   (match)
   "abc"   /a\Nc/  (match)
   "a\nc"  /a\Nc/  (no match)

so that we get all of the cases implied by #1 and #2 above.

I think this also points to why we might want to just do as much
autoconverting of 're_tests' as we can at the beginning, and then
decide we've done enough and maintain things manually from there.

Pm

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About