diff options
Diffstat (limited to 'tests/lreplace.test')
-rw-r--r-- | tests/lreplace.test | 14 |
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 |