summaryrefslogtreecommitdiffstats
path: root/tests/linsert.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/linsert.test')
-rw-r--r--tests/linsert.test20
1 files changed, 7 insertions, 13 deletions
diff --git a/tests/linsert.test b/tests/linsert.test
index 16ade39..9262812 100644
--- a/tests/linsert.test
+++ b/tests/linsert.test
@@ -4,15 +4,15 @@
# built-in commands. Sourcing this file into Tcl runs the tests and
# generates output for errors. No output means no errors were found.
#
-# Copyright © 1991-1993 The Regents of the University of California.
-# Copyright © 1994 Sun Microsystems, Inc.
-# Copyright © 1998-1999 Scriptics Corporation.
+# Copyright (c) 1991-1993 The Regents of the University of California.
+# Copyright (c) 1994 Sun Microsystems, Inc.
+# Copyright (c) 1998-1999 by Scriptics Corporation.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-if {"::tcltest" ni [namespace children]} {
- package require tcltest 2.5
+if {[lsearch [namespace children] ::tcltest] == -1} {
+ package require tcltest
namespace import -force ::tcltest::*
}
@@ -82,22 +82,16 @@ test linsert-1.20 {linsert command, use of end-int index} {
test linsert-2.1 {linsert errors} {
list [catch linsert msg] $msg
-} {1 {wrong # args: should be "linsert list index ?element ...?"}}
+} {1 {wrong # args: should be "linsert list index element ?element ...?"}}
test linsert-2.2 {linsert errors} {
list [catch {linsert a b} msg] $msg
-} {1 {bad index "b": must be integer?[+-]integer? or end?[+-]integer?}}
+} {1 {wrong # args: should be "linsert list index element ?element ...?"}}
test linsert-2.3 {linsert errors} {
list [catch {linsert a 12x 2} msg] $msg
} {1 {bad index "12x": must be integer?[+-]integer? or end?[+-]integer?}}
test linsert-2.4 {linsert errors} {
list [catch {linsert \{ 12 2} msg] $msg
} {1 {unmatched open brace in list}}
-test linsert-2.5 {syntax (TIP 323)} {
- linsert {a b c} 0
-} [list a b c]
-test linsert-2.6 {syntax (TIP 323)} {
- linsert "a\nb\nc" 0
-} [list a b c]
test linsert-3.1 {linsert won't modify shared argument objects} {
proc p {} {