diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2018-11-06 10:04:02 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2018-11-06 10:04:02 (GMT) |
commit | 179e8f4df7568f6aca6e53525abfe0505fd2a578 (patch) | |
tree | c9328ec8e0afd8af8a96b9f3da12b152cec7c281 /tests/lreplace.test | |
parent | c5a85dbfdc7dce9328b7f5fffb0bae519f68cf9f (diff) | |
parent | 2798a075ee62ea5ab4aa80279d614a8634ba378a (diff) | |
download | tcl-179e8f4df7568f6aca6e53525abfe0505fd2a578.zip tcl-179e8f4df7568f6aca6e53525abfe0505fd2a578.tar.gz tcl-179e8f4df7568f6aca6e53525abfe0505fd2a578.tar.bz2 |
merge core-8-branch
Diffstat (limited to 'tests/lreplace.test')
-rw-r--r-- | tests/lreplace.test | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/tests/lreplace.test b/tests/lreplace.test index d7f8226..fd2f7f8 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} { +} -result x +test lreplace-1.28 {lreplace command} -body { lreplace x 1 1 y -} {x y} +} -result {x y} +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 @@ -122,10 +128,10 @@ test lreplace-2.5 {lreplace errors} { } {1 {bad index "1x": must be integer?[+-]integer? or end?[+-]integer?}} test lreplace-2.6 {lreplace errors} { list [catch {lreplace x 3 2} msg] $msg -} {1 {list doesn't contain element 3}} +} {0 x} test lreplace-2.7 {lreplace errors} { list [catch {lreplace x 2 2} msg] $msg -} {1 {list doesn't contain element 2}} +} {0 x} test lreplace-3.1 {lreplace won't modify shared argument objects} { proc p {} { |