Changeset 21991

Show
Ignore:
Timestamp:
08/21/08 10:39:43 (3 months ago)
Author:
moritz
Message:

[t/spec] revert r21990, TimToady?++ moritz--

Files:
1 modified

Legend:

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

    r21990 r21991  
    143143    my ($foo, $bar) = (1, 0); 
    144144    given (1) { 
    145         when (1) { $foo = 2; last; $foo = 3; } 
     145        when (1) { $foo = 2; break; $foo = 3; } 
    146146        when (2) { $foo = 4; } 
    147147        default { $bar = 1 } 
    148148        $foo = 5; 
    149149    }; 
    150     is($foo, 2, 'last aborts when'); 
    151     ok(!$bar, 'last prevents default'); 
     150    is($foo, 2, 'break aborts when'); 
     151    ok(!$bar, 'break prevents default'); 
    152152} 
    153153 
     
    158158    for 0, 1, 2 { 
    159159        when 0 { $foo++; continue } 
    160         when 1 { $bar++; last } 
     160        when 1 { $bar++; break } 
    161161        when 2 { $quux++; } 
    162162        default { $baz = $_ } 
     
    166166    is($bar, 1, 'second iteration'); 
    167167    is($baz, 0, 'continue worked'); 
    168     is($quux, 1, "last didn't abort loop"); 
     168    is($quux, 1, "break didn't abort loop"); 
    169169    ok(!$bad, "didn't fall through"); 
    170170}