diff options
Diffstat (limited to 't/op.split')
-rw-r--r-- | t/op.split | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/t/op.split b/t/op.split index a6bb1b47c8..7c58f8f860 100644 --- a/t/op.split +++ b/t/op.split @@ -1,8 +1,8 @@ #!./perl -# $Header: op.split,v 1.0.1.1 88/02/02 11:26:37 root Exp $ +# $Header: op.split,v 2.0 88/06/05 00:14:37 root Exp $ -print "1..6\n"; +print "1..7\n"; $FS = ':'; @@ -23,9 +23,13 @@ $_ = "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(' '," a b\tc \t d ")); +if ($_ eq 'a:b:c:d') {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";} + +$_ = join(':', 'foo', split(/ /,'a b c'), 'bar'); +if ($_ eq "foo:a:b::c:bar") {print "ok 7\n";} else {print "not ok 7 $_\n";} + |