diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-02-29 21:42:18 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-02-29 21:42:18 (GMT) |
commit | 520e0c9938ef5229a94dd4d50005f141db548e69 (patch) | |
tree | 8d9204fce9d09230622a141a301e1ef225fb8784 /tests/lsearch.test | |
parent | 4cca9ff9e3ec22ef897c6160c3520c6b7ba58271 (diff) | |
download | tcl-520e0c9938ef5229a94dd4d50005f141db548e69.zip tcl-520e0c9938ef5229a94dd4d50005f141db548e69.tar.gz tcl-520e0c9938ef5229a94dd4d50005f141db548e69.tar.bz2 |
Better error-message in case of "index out of range", mentioning the actual index which was out of range. Also, use the same error-code, because the underlying cause is all the same.
Diffstat (limited to 'tests/lsearch.test')
-rw-r--r-- | tests/lsearch.test | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/lsearch.test b/tests/lsearch.test index e401581..b188924 100644 --- a/tests/lsearch.test +++ b/tests/lsearch.test @@ -432,19 +432,19 @@ test lsearch-17.11 {lsearch -index option, empty argument} { } [lsearch [list \{] \{] test lsearch-17.12 {lsearch -index option, encoding aliasing} -body { lsearch -index -2 a a -} -returnCodes error -result {index "-2" cannot select an element from any list} +} -returnCodes error -result {index "-2" out of range} test lsearch-17.13 {lsearch -index option, encoding aliasing} -body { lsearch -index -1-1 a a -} -returnCodes error -result {index "-1-1" cannot select an element from any list} +} -returnCodes error -result {index "-1-1" out of range} test lsearch-17.14 {lsearch -index option, encoding aliasing} -body { lsearch -index end--1 a a -} -returnCodes error -result {index "end--1" cannot select an element from any list} +} -returnCodes error -result {index "end--1" out of range} test lsearch-17.15 {lsearch -index option, encoding aliasing} -body { lsearch -index end+1 a a -} -returnCodes error -result {index "end+1" cannot select an element from any list} +} -returnCodes error -result {index "end+1" out of range} test lsearch-17.16 {lsearch -index option, encoding aliasing} -body { lsearch -index end+2 a a -} -returnCodes error -result {index "end+2" cannot select an element from any list} +} -returnCodes error -result {index "end+2" out of range} test lsearch-18.1 {lsearch -index option, list as index basic functionality} { |