diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2002-04-19 13:08:56 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2002-04-19 13:08:56 (GMT) |
commit | d2af1305c613b7c578a4b5be8e1ff487917b4237 (patch) | |
tree | fd5fb2f5a0a9a949aa8431b40367cc9664d2f8ea /tests | |
parent | 21901763f1b2265d4cd44100b084ab75ccf8d342 (diff) | |
download | tcl-d2af1305c613b7c578a4b5be8e1ff487917b4237.zip tcl-d2af1305c613b7c578a4b5be8e1ff487917b4237.tar.gz tcl-d2af1305c613b7c578a4b5be8e1ff487917b4237.tar.bz2 |
list/string indexes don't destroy wide int rep [Bug #526717]
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lindex.test | 7 |
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} { |