3 # Copyright (C) 2006-2007, The Perl Foundation.
6 # the following lines re-execute this as a tcl script
7 # the \ at the end of these lines makes them a comment in tcl \
8 use lib qw(languages/tcl/lib tcl/lib lib ../lib ../../lib); # \
12 source lib/test_more.tcl
16 {wrong # args: should be "split string ?splitChars?"} \
19 eval_is {split a b c} \
20 {wrong # args: should be "split string ?splitChars?"} \
23 is [lindex [split {that is fun}] 2] fun {split default}
25 is [split {Modern Major General} {}] \
26 {M o d e r n { } M a j o r { } G e n e r a l} \
29 is [split {perl.perl6.language} .] \
30 {perl perl6 language} {split single char}
32 is [split {perl.perl6.language} glop] \
33 {{} er . er 6. an ua e} {split multi char}
35 is [split {perl.perl6.language} z] {perl.perl6.language} {split and a miss}