summaryrefslogtreecommitdiffstats
path: root/tests/split.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/split.test')
-rw-r--r--tests/split.test18
1 files changed, 12 insertions, 6 deletions
diff --git a/tests/split.test b/tests/split.test
index 778131f..74879cf 100644
--- a/tests/split.test
+++ b/tests/split.test
@@ -4,15 +4,15 @@
# commands. Sourcing this file into Tcl runs the tests and generates output
# for errors. No output means no errors were found.
#
-# Copyright (c) 1991-1993 The Regents of the University of California.
-# Copyright (c) 1994-1996 Sun Microsystems, Inc.
-# Copyright (c) 1998-1999 by Scriptics Corporation.
+# Copyright © 1991-1993 The Regents of the University of California.
+# Copyright © 1994-1996 Sun Microsystems, Inc.
+# Copyright © 1998-1999 Scriptics Corporation.
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
-if {[lsearch [namespace children] ::tcltest] == -1} {
- package require tcltest
+if {"::tcltest" ni [namespace children]} {
+ package require tcltest 2.5
namespace import -force ::tcltest::*
}
@@ -43,7 +43,7 @@ test split-1.8 {basic split commands} {
foreach f [split {]\n} {}] {
append x $f
}
- return $x
+ return $x
}
foo
} {]\n}
@@ -70,6 +70,12 @@ test split-1.13 {basic split commands} {
test split-1.14 {basic split commands} {
split ",12,,,34,56," {,}
} {{} 12 {} {} 34 56 {}}
+test split-1.15 {basic split commands} -body {
+ split "a\U1F4A9b" {}
+} -result "a \U1F4A9 b"
+test split-1.16 {basic split commands} -body {
+ split "a\U1F4A9b" \U1F4A9
+} -result "a b"
test split-2.1 {split errors} {
list [catch split msg] $msg $errorCode