This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl 4.0 patch 36: (combined patch)
[perl5.git] / t / cmd / mod.t
CommitLineData
8d063cd8
LW
1#!./perl
2
fe14fcc3 3# $Header: mod.t,v 4.0 91/03/20 01:49:33 lwall Locked $
8d063cd8 4
a687059c 5print "1..7\n";
8d063cd8
LW
6
7print "ok 1\n" if 1;
8print "not ok 1\n" unless 1;
9
10print "ok 2\n" unless 0;
11print "not ok 2\n" if 0;
12
131 && (print "not ok 3\n") if 0;
141 && (print "ok 3\n") if 1;
150 || (print "not ok 4\n") if 0;
160 || (print "ok 4\n") if 1;
17
18$x = 0;
19do {$x[$x] = $x;} while ($x++) < 10;
20if (join(' ',@x) eq '0 1 2 3 4 5 6 7 8 9 10') {
21 print "ok 5\n";
22} else {
23 print "not ok 5\n";
24}
25
26$x = 15;
27$x = 10 while $x < 10;
28if ($x == 15) {print "ok 6\n";} else {print "not ok 6\n";}
a687059c
LW
29
30open(foo,'TEST') || open(foo,'t/TEST');
31$x = 0;
32$x++ while <foo>;
33print $x > 50 && $x < 1000 ? "ok 7\n" : "not ok 7\n";