diff options
author | Steve Bennett <steveb@workware.net.au> | 2020-05-02 16:43:01 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2020-05-04 21:58:38 +1000 |
commit | b58ccf39a730dba009abbbae19cb55e0200d37ac (patch) | |
tree | a48eb4289f3b10b4ca53535bb4eec8b9f68b5bc6 /tests/coverage.test | |
parent | 72c78e31ab153f318e431c81cfc4b9d08701a515 (diff) | |
download | jimtcl-b58ccf39a730dba009abbbae19cb55e0200d37ac.zip jimtcl-b58ccf39a730dba009abbbae19cb55e0200d37ac.tar.gz jimtcl-b58ccf39a730dba009abbbae19cb55e0200d37ac.tar.bz2 |
jim.c: Fix UpdateStringOfIndex()
In case the index is invalid, the string should contain -MAX_INT
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'tests/coverage.test')
-rw-r--r-- | tests/coverage.test | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/coverage.test b/tests/coverage.test index b99b273..95d6969 100644 --- a/tests/coverage.test +++ b/tests/coverage.test @@ -164,6 +164,14 @@ test index-4 {index > INT_MAX} debug-invstr { lindex {a b c} $x } {} +test index-5 {update string of index} debug-invstr { + set x -1 + lindex {a b c} $x + debug invstr $x + # x is now of index type with no string rep + set x +} {-2147483647} + test cmd-1 {standard -commands} jim { expr {"length" in [string -commands]} } {1} |