summaryrefslogtreecommitdiffstats
path: root/tests/linsert.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/linsert.test')
-rw-r--r--tests/linsert.test12
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/linsert.test b/tests/linsert.test
index 3419c74..e9c545a 100644
--- a/tests/linsert.test
+++ b/tests/linsert.test
@@ -11,7 +11,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: linsert.test,v 1.10 2005/05/10 18:35:22 kennykb Exp $
+# RCS: @(#) $Id: linsert.test,v 1.11 2008/09/29 15:38:32 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -84,16 +84,22 @@ 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 ?element ...?"}}
+} {1 {wrong # args: should be "linsert list index ?element ...?"}}
test linsert-2.2 {linsert errors} {
list [catch {linsert a b} msg] $msg
-} {1 {wrong # args: should be "linsert list index element ?element ...?"}}
+} {1 {bad index "b": must be integer?[+-]integer? or end?[+-]integer?}}
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 {} {