Import Tcl 8.6.10
This commit is contained in:
@@ -79,6 +79,15 @@ 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}
|
||||
test lindex-3.8 {compiled with static indices out of range, negative} {
|
||||
list [lindex {a b c} -1] [lindex {a b c} -2] [lindex {a b c} -3]
|
||||
} [lrepeat 3 {}]
|
||||
test lindex-3.9 {compiled with calculated indices out of range, negative constant} {
|
||||
list [lindex {a b c} -1-1] [lindex {a b c} -2+0] [lindex {a b c} -2+1]
|
||||
} [lrepeat 3 {}]
|
||||
test lindex-3.10 {compiled with calculated indices out of range, after end} {
|
||||
list [lindex {a b c} end+1] [lindex {a b c} end+2] [lindex {a b c} end+3]
|
||||
} [lrepeat 3 {}]
|
||||
|
||||
# Indices relative to end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user