summaryrefslogtreecommitdiffstats
path: root/tests/lreplace.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-03-14 21:21:10 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-03-14 21:21:10 (GMT)
commit707032478736e33d1355358b98ce94e72478362a (patch)
treed22bd9f2b969fb185e9158d0d1c0cfb973256a75 /tests/lreplace.test
parente3e05a2cf9d003885956c76ba0dcf6a6e38d8884 (diff)
downloadtcl-707032478736e33d1355358b98ce94e72478362a.zip
tcl-707032478736e33d1355358b98ce94e72478362a.tar.gz
tcl-707032478736e33d1355358b98ce94e72478362a.tar.bz2
Convert many test-cases to modern test syntax
Diffstat (limited to 'tests/lreplace.test')
-rw-r--r--tests/lreplace.test32
1 files changed, 16 insertions, 16 deletions
diff --git a/tests/lreplace.test b/tests/lreplace.test
index fd2f7f8..4ce3ef4 100644
--- a/tests/lreplace.test
+++ b/tests/lreplace.test
@@ -111,27 +111,27 @@ test lreplace-1.30 {lreplace command} -body {
lreplace {not {}alist} 0 0 [error foo]
} -returnCodes 1 -result {foo}
-test lreplace-2.1 {lreplace errors} {
+test lreplace-2.1 {lreplace errors} -body {
list [catch lreplace msg] $msg
-} {1 {wrong # args: should be "lreplace list first last ?element ...?"}}
-test lreplace-2.2 {lreplace errors} {
+} -result {1 {wrong # args: should be "lreplace list first last ?element ...?"}}
+test lreplace-2.2 {lreplace errors} -body {
list [catch {lreplace a b} msg] $msg
-} {1 {wrong # args: should be "lreplace list first last ?element ...?"}}
-test lreplace-2.3 {lreplace errors} {
+} -result {1 {wrong # args: should be "lreplace list first last ?element ...?"}}
+test lreplace-2.3 {lreplace errors} -body {
list [catch {lreplace x a 10} msg] $msg
-} {1 {bad index "a": must be integer?[+-]integer? or end?[+-]integer?}}
-test lreplace-2.4 {lreplace errors} {
+} -result {1 {bad index "a": must be integer?[+-]integer? or end?[+-]integer?}}
+test lreplace-2.4 {lreplace errors} -body {
list [catch {lreplace x 10 x} msg] $msg
-} {1 {bad index "x": must be integer?[+-]integer? or end?[+-]integer?}}
-test lreplace-2.5 {lreplace errors} {
+} -result {1 {bad index "x": must be integer?[+-]integer? or end?[+-]integer?}}
+test lreplace-2.5 {lreplace errors} -body {
list [catch {lreplace x 10 1x} msg] $msg
-} {1 {bad index "1x": must be integer?[+-]integer? or end?[+-]integer?}}
-test lreplace-2.6 {lreplace errors} {
+} -result {1 {bad index "1x": must be integer?[+-]integer? or end?[+-]integer?}}
+test lreplace-2.6 {lreplace errors} -body {
list [catch {lreplace x 3 2} msg] $msg
-} {0 x}
-test lreplace-2.7 {lreplace errors} {
+} -result {0 x}
+test lreplace-2.7 {lreplace errors} -body {
list [catch {lreplace x 2 2} msg] $msg
-} {0 x}
+} -result {0 x}
test lreplace-3.1 {lreplace won't modify shared argument objects} {
proc p {} {
@@ -228,8 +228,8 @@ apply {{} {
set tester [list lreplace $ls $a $b {*}$i]
set script [list catch $tester m]
set script "list \[$script\] \$m"
- test lreplace-6.[incr n] {lreplace battery} \
- [list apply [list {} $script]] $expected
+ test lreplace-6.[incr n] {lreplace battery} -body \
+ [list apply [list {} $script]] -result $expected
}
}
}