3 # $Header: op.subst,v 1.0 87/12/18 13:14:30 root Exp $
10 print "#1\t:$_: eq :\$x:\n";
11 if ($_ eq '$x') {print "ok 1\n";} else {print "not ok 1\n";}
15 print "#2\t:$_: eq :foo:\n";
16 if ($_ eq 'foo') {print "ok 2\n";} else {print "not ok 2\n";}
20 print "#3\t:$_: eq :\$x foo:\n";
21 if ($_ eq '$x foo') {print "ok 3\n";} else {print "not ok 3\n";}
25 $a =~ s'(b${b}e)'\n$1';
26 print "#4\t:$1: eq :bcde:\n";
27 print "#4\t:$a: eq :a\\n\$1f:\n";
28 if ($1 eq 'bcde' && $a eq 'a\n$1f') {print "ok 4\n";} else {print "not ok 4\n";}
31 if (($a =~ s/a/x/g) == 4 && $a eq 'xbxcxdx')
32 {print "ok 5\n";} else {print "not ok 5\n";}
34 if (($a =~ s/a/y/g) == 0 && $a eq 'xbxcxdx')
35 {print "ok 6\n";} else {print "not ok 6\n";}
37 if (($a =~ s/b/y/g) == 1 && $a eq 'xyxcxdx')
38 {print "ok 7\n";} else {print "not ok 7\n";}