summaryrefslogtreecommitdiffstats
path: root/tests/lset.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2005-04-29 20:49:39 (GMT)
committerdgp <dgp@users.sourceforge.net>2005-04-29 20:49:39 (GMT)
commit8b1602650fa95940adc93df6e9c477d12de32664 (patch)
tree55c506247b96b5a5df5bcc7f1aeb3f66cbc3cdb8 /tests/lset.test
parent0ab970b22ad15d0f56a3d5a53461daedf8bfc5ef (diff)
downloadtcl-8b1602650fa95940adc93df6e9c477d12de32664.zip
tcl-8b1602650fa95940adc93df6e9c477d12de32664.tar.gz
tcl-8b1602650fa95940adc93df6e9c477d12de32664.tar.bz2
TIP#176 IMPLEMENTATION [Patch 1165695]
* generic/tclUtil.c: Extended TclGetIntForIndex to recognize index formats including end+integer and integer+/-integer. * generic/tclCmdMZ.c: Extended the -start switch of [regexp] and [regsub] to accept all index formats known by TclGetIntForIndex. * doc/lindex.n: Updated docs to note new index formats. * doc/linsert.n: * doc/lrange.n: * doc/lreplace.n: * doc/lsearch.n: * doc/lset.n: * doc/lsort.n: * doc/regexp.n: * doc/regsub.n: * doc/string.n: * tests/cmdIL.test: Updated tests. * tests/compile.test: * tests/lindex.test: * tests/linsert.test: * tests/lrange.test: * tests/lreplace.test: * tests/lsearch.test: * tests/lset.test: * tests/regexp.test: * tests/regexpComp.test: * tests/string.test: * tests/stringComp.test: * tests/util.test:
Diffstat (limited to 'tests/lset.test')
-rw-r--r--tests/lset.test10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/lset.test b/tests/lset.test
index 048e9ba..00facb2 100644
--- a/tests/lset.test
+++ b/tests/lset.test
@@ -51,7 +51,7 @@ test lset-2.2 {lset, not compiled, 3 args, second arg neither index nor list} te
list [catch {
testevalex {lset x {{bad}1} 3}
} msg] $msg
-} "1 {bad index \"{bad}1\": must be integer or end?-integer?}"
+} {1 {bad index "{bad}1": must be integer?[+-]integer? or end?[+-]integer?}}
test lset-3.1 {lset, not compiled, 3 args, data duplicated} testevalex {
set x {0 1 2}
@@ -99,7 +99,7 @@ test lset-4.2 {lset, not compiled, 3 args, bad index} testevalex {
list [catch {
testevalex {lset a [list 2a2] w}
} msg] $msg
-} {1 {bad index "2a2": must be integer or end?-integer?}}
+} {1 {bad index "2a2": must be integer?[+-]integer? or end?[+-]integer?}}
test lset-4.3 {lset, not compiled, 3 args, index out of range} testevalex {
set a {x y z}
@@ -141,7 +141,7 @@ test lset-4.8 {lset, not compiled, 3 args, bad index} testevalex {
list [catch {
testevalex {lset a 2a2 w}
} msg] $msg
-} {1 {bad index "2a2": must be integer or end?-integer?}}
+} {1 {bad index "2a2": must be integer?[+-]integer? or end?[+-]integer?}}
test lset-4.9 {lset, not compiled, 3 args, index out of range} testevalex {
set a {x y z}
@@ -300,12 +300,12 @@ test lset-8.2 {lset, not compiled, malformed sublist} testevalex {
test lset-8.3 {lset, not compiled, bad second index} testevalex {
set a {{b c} {d e}}
list [catch {testevalex {lset a 0 2a2 f}} msg] $msg
-} {1 {bad index "2a2": must be integer or end?-integer?}}
+} {1 {bad index "2a2": must be integer?[+-]integer? or end?[+-]integer?}}
test lset-8.4 {lset, not compiled, bad second index} testevalex {
set a {{b c} {d e}}
list [catch {testevalex {lset a {0 2a2} f}} msg] $msg
-} {1 {bad index "2a2": must be integer or end?-integer?}}
+} {1 {bad index "2a2": must be integer?[+-]integer? or end?[+-]integer?}}
test lset-8.5 {lset, not compiled, second index out of range} testevalex {
set a {{b c} {d e} {f g}}