summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorKriton Kyrimis <kyrimis@princeton.edu>1988-02-01 22:28:33 +0000
committerLarry Wall <lwall@jpl-devvax.jpl.nasa.gov>1988-02-01 22:28:33 +0000
commit2e1b3b7e9018b7d16d598adb631073672439d869 (patch)
tree6ee91f55ef0c0cf0f9e15c0683ddfccd84c022be /t
parent9bb9d9f726fa55c70ed76abad9fe7c61d4eb4182 (diff)
downloadperl-2e1b3b7e9018b7d16d598adb631073672439d869.tar.gz
perl 1.0 patch 13: fix for faulty patch 12, plus random portability glitches
I botched patch #12, so that split(' ') only works on the first line of input due to unintended interference by the optimization that was added at the same time. Yes, I tested it, but only on one line of input. *Sigh* Some glitches have turned up on some of the rusty pig iron out there, so here are some unglitchifications.
Diffstat (limited to 't')
-rw-r--r--t/op.split11
1 files changed, 9 insertions, 2 deletions
diff --git a/t/op.split b/t/op.split
index 988af49d3d..a6bb1b47c8 100644
--- a/t/op.split
+++ b/t/op.split
@@ -1,8 +1,8 @@
#!./perl
-# $Header: op.split,v 1.0 87/12/18 13:14:20 root Exp $
+# $Header: op.split,v 1.0.1.1 88/02/02 11:26:37 root Exp $
-print "1..4\n";
+print "1..6\n";
$FS = ':';
@@ -22,3 +22,10 @@ if (join(".",@ary) eq "a.b.c.\n") {print "ok 3\n";} else {print "not ok 3\n";}
$_ = "a:b:c::::";
@ary = split(/:/);
if (join(".",@ary) eq "a.b.c") {print "ok 4\n";} else {print "not ok 4\n";}
+
+$_ = join(':',split(' ',' a b c '));
+if ($_ eq 'a:b:c') {print "ok 5\n";} else {print "not ok 5\n";}
+
+$_ = join(':',split(/ */,"foo bar bie\tdoll"));
+if ($_ eq "f:o:o:b:a:r:b:i:e:\t:d:o:l:l")
+ {print "ok 6\n";} else {print "not ok 6\n";}