summaryrefslogtreecommitdiffstats
path: root/tests/lindex.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lindex.test')
-rw-r--r--tests/lindex.test7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/lindex.test b/tests/lindex.test
index 98ca49d..ea52e91 100644
--- a/tests/lindex.test
+++ b/tests/lindex.test
@@ -12,7 +12,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: lindex.test,v 1.9 2001/11/14 23:16:35 hobbs Exp $
+# RCS: @(#) $Id: lindex.test,v 1.10 2002/04/19 13:08:56 dkf Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -83,6 +83,11 @@ test lindex-3.6 {bad octal} {
list [catch { eval [list $lindex {a b c} $x] } result] $result
} "1 {bad index \"-09\": must be integer or end?-integer? (looks like invalid octal number)}"
+test lindex-3.7 {indexes don't shimmer wide ints} {
+ set x [expr {(wide(1)<<31) - 2}]
+ list $x [lindex {1 2 3} $x] [incr x] [incr x]
+} {2147483646 {} 2147483647 2147483648}
+
# Indices relative to end
test lindex-4.1 {index = end} {