Changeset 5457

Show
Ignore:
Timestamp:
07/12/05 01:58:48 (3 years ago)
Author:
nothingmuch
svk:copy_cache_prev:
7349
Message:

geoffb++'s next bug test case, and a similar test case for redo.

Location:
t/statements
Files:
1 added
1 modified

Legend:

Unmodified
Added
Removed
  • t/statements/next.t

    r3217 r5457  
    1515=cut 
    1616 
    17 plan 9; 
     17plan 11; 
    1818 
    1919# test for loops with next 
     
    109109        is($bar, "ABCCBCCABCCBCC", "next works on inner loop of 3"); 
    110110} 
     111 
     112{ 
     113        my @log;         
     114        my $i; 
     115        while ++$i < 2 { 
     116                push @log, "before"; 
     117                next; 
     118                push @log, "after"; 
     119        } 
     120         
     121        is(~@log, "before", "statements after next are not executed"); 
     122} 
     123 
     124