diff options
author | Chip Salzenberg <chip@pobox.com> | 1997-09-16 09:47:28 -0400 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-03-02 03:01:27 +0000 |
commit | ecca16b0cfe0c7f04ba520f2924946a13507530e (patch) | |
tree | 24ae5b5a1830dddf285dc713d84023901e907fd8 /t/cmd | |
parent | dab48698179b4e8606409875b7121f225bcf46be (diff) | |
download | perl-ecca16b0cfe0c7f04ba520f2924946a13507530e.tar.gz |
[win32] yet another patch
Message-Id: <199709161748.NAA08418@nielsenmedia.com>
Subject: Tiny but massively cool: C<statement foreach @list>
p4raw-id: //depot/win32/perl@612
Diffstat (limited to 't/cmd')
-rwxr-xr-x | t/cmd/mod.t | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/t/cmd/mod.t b/t/cmd/mod.t index b4f2731ffa..e2ab777246 100755 --- a/t/cmd/mod.t +++ b/t/cmd/mod.t @@ -2,7 +2,7 @@ # $RCSfile: mod.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:11 $ -print "1..11\n"; +print "1..12\n"; print "ok 1\n" if 1; print "not ok 1\n" unless 1; @@ -27,21 +27,28 @@ $x = 15; $x = 10 while $x < 10; if ($x == 15) {print "ok 6\n";} else {print "not ok 6\n";} +$y[$_] = $_ * 2 foreach @x; +if (join(' ',@y) eq '0 2 4 6 8 10 12 14 16 18 20') { + print "ok 7\n"; +} else { + print "not ok 7 @y\n"; +} + open(foo,'./TEST') || open(foo,'TEST') || open(foo,'t/TEST'); $x = 0; $x++ while <foo>; -print $x > 50 && $x < 1000 ? "ok 7\n" : "not ok 7\n"; +print $x > 50 && $x < 1000 ? "ok 8\n" : "not ok 8\n"; $x = -0.5; print "not " if scalar($x) < 0 and $x >= 0; -print "ok 8\n"; +print "ok 9\n"; print "not " unless (-(-$x) < 0) == ($x < 0); -print "ok 9\n"; +print "ok 10\n"; -print "ok 10\n" if $x < 0; -print "not ok 10\n" unless $x < 0; +print "ok 11\n" if $x < 0; +print "not ok 11\n" unless $x < 0; -print "ok 11\n" unless $x > 0; -print "not ok 11\n" if $x > 0; +print "ok 12\n" unless $x > 0; +print "not ok 12\n" if $x > 0; |