summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPerl 5 Porters <perl5-porters@africa.nicoh.com>1996-06-17 06:37:49 +0000
committerCharles Bailey <bailey@genetics.upenn.edu>1996-06-17 06:37:49 +0000
commitc85b29f874947d49f0c63e6760d1ff47993ea3fd (patch)
tree9e478d217ea678b340a60c430c5893f04824eba5
parent3149255e88d4a22fc3c3fb6f3709f80d98403d8a (diff)
downloadperl-c85b29f874947d49f0c63e6760d1ff47993ea3fd.tar.gz
Added tests for multicharacter record delimiters
-rwxr-xr-xt/op/chop.t17
1 files changed, 16 insertions, 1 deletions
diff --git a/t/op/chop.t b/t/op/chop.t
index 3516c2d18c..77263ad3ad 100755
--- a/t/op/chop.t
+++ b/t/op/chop.t
@@ -2,7 +2,7 @@
# $RCSfile: chop.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:40 $
-print "1..22\n";
+print "1..28\n";
# optimized
@@ -70,3 +70,18 @@ $_ = "f";
$/ = "";
print chomp() == 0 ? "ok 21\n" : "not ok 21\n";
print $_ eq "f" ? "ok 22\n" : "not ok 22\n";
+
+$_ = "xx";
+$/ = "xx";
+print chomp() == 2 ? "ok 23\n" : "not ok 23\n";
+print $_ eq "" ? "ok 24\n" : "not ok 24\n";
+
+$_ = "axx";
+$/ = "xx";
+print chomp() == 2 ? "ok 25\n" : "not ok 25\n";
+print $_ eq "a" ? "ok 26\n" : "not ok 26\n";
+
+$_ = "axx";
+$/ = "yy";
+print chomp() == 0 ? "ok 27\n" : "not ok 27\n";
+print $_ eq "axx" ? "ok 28\n" : "not ok 28\n";