summaryrefslogtreecommitdiffstats
path: root/tests/subst.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/subst.test')
-rw-r--r--tests/subst.test34
1 files changed, 17 insertions, 17 deletions
diff --git a/tests/subst.test b/tests/subst.test
index 0d0614d..0503a45 100644
--- a/tests/subst.test
+++ b/tests/subst.test
@@ -4,15 +4,15 @@
# built-in commands. Sourcing this file into Tcl runs the tests and
# generates output for errors. No output means no errors were found.
#
-# Copyright (c) 1994 The Regents of the University of California.
-# Copyright (c) 1994 Sun Microsystems, Inc.
-# Copyright (c) 1998-2000 Ajuba Solutions.
+# Copyright © 1994 The Regents of the University of California.
+# Copyright © 1994 Sun Microsystems, Inc.
+# Copyright © 1998-2000 Ajuba Solutions.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
if {"::tcltest" ni [namespace children]} {
- package require tcltest 2.1
+ package require tcltest 2.5
namespace import -force ::tcltest::*
}
::tcltest::loadTestedCommands
@@ -132,20 +132,20 @@ test subst-7.3 {switches} -returnCodes error -body {
} -result {bad option "-bogus": must be -nobackslashes, -nocommands, or -novariables}
test subst-7.4 {switches} {
set x 123
- subst -nobackslashes {abc $x [expr 1+2] \\\x41}
+ subst -nobackslashes {abc $x [expr {1 + 2}] \\\x41}
} {abc 123 3 \\\x41}
test subst-7.5 {switches} {
set x 123
- subst -nocommands {abc $x [expr 1+2] \\\x41}
-} {abc 123 [expr 1+2] \A}
+ subst -nocommands {abc $x [expr {1 + 2}] \\\x41}
+} {abc 123 [expr {1 + 2}] \A}
test subst-7.6 {switches} {
set x 123
- subst -novariables {abc $x [expr 1+2] \\\x41}
+ subst -novariables {abc $x [expr {1 + 2}] \\\x41}
} {abc $x 3 \A}
test subst-7.7 {switches} {
set x 123
- subst -nov -nob -noc {abc $x [expr 1+2] \\\x41}
-} {abc $x [expr 1+2] \\\x41}
+ subst -nov -nob -noc {abc $x [expr {1 + 2}] \\\x41}
+} {abc $x [expr {1 + 2}] \\\x41}
test subst-8.1 {return in a subst} {
subst {foo [return {x}; bogus code] bar}
@@ -282,18 +282,18 @@ test subst-13.1 {Bug 3081065} -setup {
demo name2
} subst13.tcl]
} -body {
- interp create slave
- slave eval [list source $script]
- interp delete slave
- interp create slave
- slave eval {
+ interp create child
+ child eval [list source $script]
+ interp delete child
+ interp create child
+ child eval {
set count 400
while {[incr count -1]} {
lappend bloat [expr {rand()}]
}
}
- slave eval [list source $script]
- interp delete slave
+ child eval [list source $script]
+ interp delete child
} -cleanup {
removeFile subst13.tcl
}