On Mon, Jul 25, 2005 at 06:10:38PM -0300, Adriano Ferreira wrote:
> I have written a patch to approach the TODO item of "prove":
> 
>         Shuffled tests must be recreatable
> 
> "prove" still works the same, but with extra options to control
> --shuffle option.
> 
>   prove --shuffle t # runs shuffled 't/*.t' scripts (as usual)
> 
>   prove --shuffle --seed=808208 t # shuffle is initiated with given seed value
> 
>   prove --shuffle --list=5,4,0,1,2,3 t # the shuffle list is predetermined

I'm not sure I see the utility in that last one that significantly beats
out just reordering the arguments to prove.  Do you have a use case?  And
what happens when the number of args is > the list?


> I am sending it for your appreciation. I am still writing a test for
> --shuffle and the added options --seed and --list.

If I may suggest something.  --shuffle should print the seed it used

        my $seed = $Seed || int rand(2**$Config{randbits});
        print STDERR "Using seed: $seed\n";
        srand $seed;

that way you can repeat a failed --shuffle test without having to first
remember to set --seed.


-- 
Michael G Schwern     [EMAIL PROTECTED]     http://www.pobox.com/~schwern
Reality is that which, when you stop believing in it, doesn't go away.
        -- Phillip K. Dick

Reply via email to