summaryrefslogtreecommitdiffstats
path: root/tests/lreplace.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2018-03-09 22:18:30 (GMT)
committerdgp <dgp@users.sourceforge.net>2018-03-09 22:18:30 (GMT)
commit87fd09e44a51e90ebb71a1f46a5300859c62e99a (patch)
tree0cdf856871de94cc8600b76014a998f815070896 /tests/lreplace.test
parentf337281f750a928dcc07884286cc1f4cceeab809 (diff)
parentcd4e0ec5deffef9dbc4331768ca660fef4590501 (diff)
downloadtcl-87fd09e44a51e90ebb71a1f46a5300859c62e99a.zip
tcl-87fd09e44a51e90ebb71a1f46a5300859c62e99a.tar.gz
tcl-87fd09e44a51e90ebb71a1f46a5300859c62e99a.tar.bz2
[db36fa5122] Upgrade the index value parsing and encoding machinery.
Refactor many systems to make consistent use of it. Repairs many indexing errors in corner cases.
Diffstat (limited to 'tests/lreplace.test')
-rw-r--r--tests/lreplace.test14
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/lreplace.test b/tests/lreplace.test
index d7f8226..4a6b853 100644
--- a/tests/lreplace.test
+++ b/tests/lreplace.test
@@ -98,12 +98,18 @@ test lreplace-1.26 {lreplace command} {
[set foo [lreplace $foo end end]] \
[set foo [lreplace $foo end end]]
} {a {} {}}
-test lreplace-1.27 {lreplace command} {
+test lreplace-1.27 {lreplace command} -body {
lreplace x 1 1
-} x
-test lreplace-1.28 {lreplace command} {
+} -returnCodes 1 -result {list doesn't contain element 1}
+test lreplace-1.28 {lreplace command} -body {
lreplace x 1 1 y
-} {x y}
+} -returnCodes 1 -result {list doesn't contain element 1}
+test lreplace-1.29 {lreplace command} -body {
+ lreplace x 1 1 [error foo]
+} -returnCodes 1 -result {foo}
+test lreplace-1.30 {lreplace command} -body {
+ lreplace {not {}alist} 0 0 [error foo]
+} -returnCodes 1 -result {foo}
test lreplace-2.1 {lreplace errors} {
list [catch lreplace msg] $msg