3 # $RCSfile: chop.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:40 $
11 if ($c . $_ eq 'cab') {print "ok 1\n";} else {print "not ok 1 $c$_\n";}
17 if ($c . $_ eq 'cab') {print "ok 2\n";} else {print "not ok 2\n";}
23 @foo = ("hi \n","there\n","!\n");
26 print join('',@bar) eq 'hi there!' ? "ok 3\n" : "not ok 3\n";
30 print join('',$foo,@foo) eq 'hi there!' ? "ok 4\n" : "not ok 4\n";
33 print chomp() == 1 ? "ok 5\n" : "not ok 5\n";
34 print $_ eq "foo\n" ? "ok 6\n" : "not ok 6\n";
37 print chomp() == 1 ? "ok 7\n" : "not ok 7\n";
38 print $_ eq "foo" ? "ok 8\n" : "not ok 8\n";
41 print chomp() == 0 ? "ok 9\n" : "not ok 9\n";
42 print $_ eq "foo" ? "ok 10\n" : "not ok 10\n";
46 print chomp() == 2 ? "ok 11\n" : "not ok 11\n";
47 print $_ eq "f" ? "ok 12\n" : "not ok 12\n";
51 print chomp() == 0 ? "ok 13\n" : "not ok 13\n";
52 print $_ eq "bar" ? "ok 14\n" : "not ok 14\n";
56 print chomp() == 5 ? "ok 15\n" : "not ok 15\n";
57 print $_ eq "f" ? "ok 16\n" : "not ok 16\n";
61 print chomp() == 2 ? "ok 17\n" : "not ok 17\n";
62 print $_ eq "f" ? "ok 18\n" : "not ok 18\n";
66 print chomp() == 1 ? "ok 19\n" : "not ok 19\n";
67 print $_ eq "f" ? "ok 20\n" : "not ok 20\n";
71 print chomp() == 0 ? "ok 21\n" : "not ok 21\n";
72 print $_ eq "f" ? "ok 22\n" : "not ok 22\n";