xref: /onnv-gate/usr/src/cmd/perl/5.8.4/distrib/t/base/cond.t (revision 0:68f95e015346)
1*0Sstevel@tonic-gate#!./perl
2*0Sstevel@tonic-gate
3*0Sstevel@tonic-gate# $RCSfile: cond.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:02 $
4*0Sstevel@tonic-gate
5*0Sstevel@tonic-gate# make sure conditional operators work
6*0Sstevel@tonic-gate
7*0Sstevel@tonic-gateprint "1..4\n";
8*0Sstevel@tonic-gate
9*0Sstevel@tonic-gate$x = '0';
10*0Sstevel@tonic-gate
11*0Sstevel@tonic-gate$x eq $x && (print "ok 1\n");
12*0Sstevel@tonic-gate$x ne $x && (print "not ok 1\n");
13*0Sstevel@tonic-gate$x eq $x || (print "not ok 2\n");
14*0Sstevel@tonic-gate$x ne $x || (print "ok 2\n");
15*0Sstevel@tonic-gate
16*0Sstevel@tonic-gate$x == $x && (print "ok 3\n");
17*0Sstevel@tonic-gate$x != $x && (print "not ok 3\n");
18*0Sstevel@tonic-gate$x == $x || (print "not ok 4\n");
19*0Sstevel@tonic-gate$x != $x || (print "ok 4\n");
20