Changeset 22043

Show
Ignore:
Timestamp:
08/27/08 16:20:05 (3 months ago)
Author:
moritz
Message:

[t/spec] test for RT #58392, masak++

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • t/spec/S04-statements/for.t

    r21953 r22043  
    1212=end description 
    1313 
    14 plan 39; 
     14plan 40; 
    1515 
    1616## No foreach 
     
    298298    is($a, 'ArrayArray', 'List context'); 
    299299} 
     300 
     301{ 
     302    # this was a rakudo bug with mixed 'for' and recursion, which seems to  
     303    # confuse some lexical pads or the like. 
     304    my $gather = ''; 
     305    sub f($l) { 
     306        if $l <= 0 { 
     307            return $l; 
     308        } 
     309        $gather ~= $l; 
     310        for 1..3 { 
     311        f($l-1); 
     312            $gather ~= '.'; 
     313        } 
     314    } 
     315    f(2); 
     316 
     317    #?rakudo todo 'bug in for/recursion interaction, RT #58392' 
     318    is $gather, '21....1....1....', 'Can mix recursion and for'; 
     319} 
     320