perl 3.0: (no announcement message available)
[p5sagit/p5-mst-13.2.git] / t / cmd.mod
1 #!./perl
2
3 # $Header: cmd.mod,v 3.0 89/10/18 15:24:48 lwall Locked $
4
5 print "1..7\n";
6
7 print "ok 1\n" if 1;
8 print "not ok 1\n" unless 1;
9
10 print "ok 2\n" unless 0;
11 print "not ok 2\n" if 0;
12
13 1 && (print "not ok 3\n") if 0;
14 1 && (print "ok 3\n") if 1;
15 0 || (print "not ok 4\n") if 0;
16 0 || (print "ok 4\n") if 1;
17
18 $x = 0;
19 do {$x[$x] = $x;} while ($x++) < 10;
20 if (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;
28 if ($x == 15) {print "ok 6\n";} else {print "not ok 6\n";}
29
30 open(foo,'TEST') || open(foo,'t/TEST');
31 $x = 0;
32 $x++ while <foo>;
33 print $x > 50 && $x < 1000 ? "ok 7\n" : "not ok 7\n";