On Jan 9, 2008 12:08 AM, Cosimo Streppone <[EMAIL PROTECTED]> wrote: > I'm trying to play with perl6.exe. > I've wandered in the opened tickets for perl6 and > saw this one about `substr()': > > http://rt.perl.org/rt3/Public/Bug/Display.html?id=44321 > > It ends with a patch that enables the 3rd optional > argument for substr(). I gave it a shot, and it seems to > work. > yay!
> So question is: would be useful to "port" the substr() > test script from Perl5's `t/op/substr.t' also to Perl6? > > I have looked at the task, and it's not so straightforward > as it seemed at first sight, but I'd like to volunteer for > that, just to learn something along the way. > > Would that be useful? > > Or if you have other suggestions, maybe for Sat 12th :-) , > I'm willing to do "something" for parrot/perl6. > what we ultimately want is tests that cover the spec, which for 'substr' is probably very close to the perl 5 spec. however, my first suggestion is to look in the pugs test suite for tests that cover substr. here's how i'd start: get perl 6 design documents * svn co http://svn.perl.org/perl6/doc/trunk perl6-doc && cd perl6-doc search for synopses that contain 'substr' * ack substr -al open specs in your browser, so you can see smartlinked pugs tests * http://spec.pugscode.org/ search through specs for 'substr' and look for smartlinks for related tests * /substr & ctrl-g etc in firefox refactor these tests in the pugs repo to match the synopses (for example, look at t/spec/ in the pugs repo) once the tests have been refactored, modify t/fetchspec and config/makefiles/root.in to make sure they're run with 'make spectest' the last few steps aren't well defined, and take a bit of work to get right. if you feel you can't attack that just yet, try to take some existing tests, get them passing (or todo the failing ones) and submit a patch for t/00-parrot. patrick or i will soon write some tutorials on test refactoring in the pugs repo, which is something we really need now, and something that almost anyone can do. hope that didn't scare you off! :) ~jerry