diff options
Diffstat (limited to 't/cmd.mod')
-rw-r--r-- | t/cmd.mod | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/t/cmd.mod b/t/cmd.mod new file mode 100644 index 0000000000..96367e96e9 --- /dev/null +++ b/t/cmd.mod @@ -0,0 +1,28 @@ +#!./perl + +# $Header: cmd.mod,v 1.0 87/12/18 13:12:09 root Exp $ + +print "1..6\n"; + +print "ok 1\n" if 1; +print "not ok 1\n" unless 1; + +print "ok 2\n" unless 0; +print "not ok 2\n" if 0; + +1 && (print "not ok 3\n") if 0; +1 && (print "ok 3\n") if 1; +0 || (print "not ok 4\n") if 0; +0 || (print "ok 4\n") if 1; + +$x = 0; +do {$x[$x] = $x;} while ($x++) < 10; +if (join(' ',@x) eq '0 1 2 3 4 5 6 7 8 9 10') { + print "ok 5\n"; +} else { + print "not ok 5\n"; +} + +$x = 15; +$x = 10 while $x < 10; +if ($x == 15) {print "ok 6\n";} else {print "not ok 6\n";} |