File: c_like_for_loop.t

package info (click to toggle)
libsmart-comments-perl 1.06-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 228 kB
  • sloc: perl: 303; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 486 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use Smart::Comments;
use Test::More 'no_plan';

close *STDERR;
my $STDERR = q{};
open *STDERR, '>', \$STDERR;

my $count = 0;

LABEL:

for (my $count=0;$count < 100;$count++) {    ### C-like for loop:===|   done
    # nothing
}

like $STDERR, qr/C-like for loop:|                   done\r/
                                            => 'First iteration';

like $STDERR, qr/C-like for loop:=|                  done\r/ 
                                            => 'Second iteration';