On Mon, Dec 20, 2004 at 01:59:57PM +0200, Markus Laire wrote:
> 
> I was wondering if it would make sense to add the original 're_tests' 
> file to parrot distribution, with a script which autogenerates 
> 're_tests.t' from it. This way it would be possible to update the script 
> if testing-format is changed, or if some bigger mistakes are seen.
>
> Of course small errors in 're_tests.t' file could be fixed manually, but 
> if testing-format it changed, then those changes would be lost when file 
> was autogenerated again.

After thinking about this a bit...

Although it's probably worthwhile for us to find a good way to encode
p6rule tests in a way that allows us to go to other formats in the future,
I'm not so sure we buy a lot in being able to do that for the original
're_tests'.  As I'll note in my next message, the semantics of regexs
and rules are just different enough that I don't think that 
a one-to-one correspondence for 're_tests' is worth trying to
preserve or code around.  At some point I think it's just better to
use the autogenerating script to create re_tests.t, manually fix re_tests.t
for the things that don't convert, and then go from there.  

Plus, I suspect that p5's 're_tests' is mature enough that it doesn't 
change often, and the places where it might change in the future are 
esoteric enough that it'd be easier to add+translate those changes manually 
than to update the conversion script.

Note that for this I'm only talking about ease of building and maintaining
the p6rules test suite.  Having a script to automatically convert any 
arbitrary p5 regex to its p6 equivalent *is* important, useful, and 
definitely worth pursuing, but I'm not sure it's worth the effort (at
this stage) to worry about keeping the p6rules test suite consistent
with that.  And the p5->p6 regex converter will probably deserves its 
own test suite, once p6rules is sufficiently advanced.

Pm

Reply via email to