summaryrefslogtreecommitdiffstats
path: root/tests/util.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2018-02-15 17:24:40 (GMT)
committerdgp <dgp@users.sourceforge.net>2018-02-15 17:24:40 (GMT)
commit3b3a5ff07f3a3dd2bff6de66c86bb2d3883d9aa6 (patch)
treeaec3a9bdac672e7e85817ad81962c86dc3dbd83a /tests/util.test
parentcce4368acee1315cdc42e9d8c5db59a8f479edf7 (diff)
downloadtcl-3b3a5ff07f3a3dd2bff6de66c86bb2d3883d9aa6.zip
tcl-3b3a5ff07f3a3dd2bff6de66c86bb2d3883d9aa6.tar.gz
tcl-3b3a5ff07f3a3dd2bff6de66c86bb2d3883d9aa6.tar.bz2
Better range checking in "string index". Add test-case to prove point.
This opens a large discussion on what the right valid range for index values should be and what overflow behavior should be. New branch opened to answer those questions completely.
Diffstat (limited to 'tests/util.test')
-rw-r--r--tests/util.test6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/util.test b/tests/util.test
index 35fc642..d186523 100644
--- a/tests/util.test
+++ b/tests/util.test
@@ -729,6 +729,12 @@ test util-9.43 {TclGetIntForIndex} -body {
test util-9.44 {TclGetIntForIndex} -body {
string index a 0+1000000000000
} -returnCodes error -match glob -result *
+test util-9.45 {TclGetIntForIndex} {
+ string index abcd end+2305843009213693950
+} {}
+test util-9.46 {TclGetIntForIndex} {
+ string index abcd end+4294967294
+} {}
test util-10.1 {Tcl_PrintDouble - rounding} {ieeeFloatingPoint} {
convertDouble 0x0000000000000000