summaryrefslogtreecommitdiffstats
path: root/tests/namespace.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-09-01 09:15:11 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-09-01 09:15:11 (GMT)
commit724de352e37dd0fe795024353378cd662593b4a6 (patch)
tree4d740034b1040a594df0e43c023bc8c38283368d /tests/namespace.test
parent6b0b7154f13dc5d47830ef1daaea80c791504f8a (diff)
downloadtcl-724de352e37dd0fe795024353378cd662593b4a6.zip
tcl-724de352e37dd0fe795024353378cd662593b4a6.tar.gz
tcl-724de352e37dd0fe795024353378cd662593b4a6.tar.bz2
Many more internal master/slave -> parent/child renamings
Diffstat (limited to 'tests/namespace.test')
-rw-r--r--tests/namespace.test92
1 files changed, 46 insertions, 46 deletions
diff --git a/tests/namespace.test b/tests/namespace.test
index 796b46b..2b25803 100644
--- a/tests/namespace.test
+++ b/tests/namespace.test
@@ -56,7 +56,7 @@ test namespace-2.2 {Tcl_GetCurrentNamespace} {
test namespace-3.1 {Tcl_GetGlobalNamespace} {
namespace eval test_ns_1 {namespace eval foo {namespace eval bar {} } }
- # namespace children uses Tcl_GetGlobalNamespace
+ # namespace children uses Tcl_GetGlobalNamespace
namespace eval test_ns_1 {namespace children foo b*}
} {::test_ns_1::foo::bar}
@@ -108,7 +108,7 @@ test namespace-6.2 {Tcl_CreateNamespace, odd number of :'s in name is okay} {
[namespace eval test_ns_2:::::foo {namespace current}]
} {::test_ns_1::foo ::test_ns_2::foo}
test namespace-6.3 {Tcl_CreateNamespace, trailing ::s in ns name are ignored} {
- list [catch {namespace eval test_ns_7::: {namespace current}} msg] $msg
+ list [catch {namespace eval test_ns_7::: {namespace current}} msg] $msg
} {0 ::test_ns_7}
test namespace-6.4 {Tcl_CreateNamespace, trailing ::s in ns name are ignored} {
catch {namespace delete {*}[namespace children :: test_ns_*]}
@@ -179,21 +179,21 @@ test namespace-7.6 {recursive Tcl_DeleteNamespace, no active call frames in ns}
namespace delete test_ns_2
} {}
test namespace-7.7 {Bug 1655305} -setup {
- interp create slave
+ interp create child
# Can't invoke through the ensemble, since deleting the global namespace
# (indirectly, via deleting ::tcl) deletes the ensemble.
- slave eval {rename ::tcl::info::commands ::infocommands}
- slave hide infocommands
- slave eval {
+ child eval {rename ::tcl::info::commands ::infocommands}
+ child hide infocommands
+ child eval {
proc foo {} {
namespace delete ::
}
}
} -body {
- slave eval foo
- slave invokehidden infocommands
+ child eval foo
+ child invokehidden infocommands
} -cleanup {
- interp delete slave
+ interp delete child
} -result {}
test namespace-7.8 {Bug ba1419303b4c} -setup {
@@ -205,7 +205,7 @@ test namespace-7.8 {Bug ba1419303b4c} -setup {
namespace delete ns1
}
} -body {
- # No segmentation fault given --enable-symbols=mem.
+ # No segmentation fault given --enable-symbols=mem.
namespace delete ns1
} -result {}
@@ -269,28 +269,28 @@ test namespace-8.4 {TclTeardownNamespace, cmds imported from deleted ns go away}
[info commands test_ns_import::*]
} [list [lsort {::test_ns_import::p ::test_ns_import::cmd1 ::test_ns_import::cmd2}] {} ::test_ns_import::p]
test namespace-8.5 {TclTeardownNamespace: preserve errorInfo; errorCode values} {
- interp create slave
- slave eval {trace add execution error leave {namespace delete :: ;#}}
- catch {slave eval error foo bar baz}
- interp delete slave
+ interp create child
+ child eval {trace add execution error leave {namespace delete :: ;#}}
+ catch {child eval error foo bar baz}
+ interp delete child
set ::errorInfo
} {bar
invoked from within
-"slave eval error foo bar baz"}
+"child eval error foo bar baz"}
test namespace-8.6 {TclTeardownNamespace: preserve errorInfo; errorCode values} {
- interp create slave
- slave eval {trace add variable errorCode write {namespace delete :: ;#}}
- catch {slave eval error foo bar baz}
- interp delete slave
+ interp create child
+ child eval {trace add variable errorCode write {namespace delete :: ;#}}
+ catch {child eval error foo bar baz}
+ interp delete child
set ::errorInfo
} {bar
invoked from within
-"slave eval error foo bar baz"}
+"child eval error foo bar baz"}
test namespace-8.7 {TclTeardownNamespace: preserve errorInfo; errorCode values} {
- interp create slave
- slave eval {trace add execution error leave {namespace delete :: ;#}}
- catch {slave eval error foo bar baz}
- interp delete slave
+ interp create child
+ child eval {trace add execution error leave {namespace delete :: ;#}}
+ catch {child eval error foo bar baz}
+ interp delete child
set ::errorCode
} baz
@@ -1098,17 +1098,17 @@ test namespace-22.5 {NamespaceCodeCmd, in other namespace} {
namespace code cmd
}
} {::namespace inscope ::test_ns_1 cmd}
-test namespace-22.6 {NamespaceCodeCmd, in other namespace} {
- namespace eval test_ns_1 {
- variable v 42
- }
- namespace eval test_ns_2 {
- proc namespace args {}
- }
- namespace eval test_ns_2 [namespace eval test_ns_1 {
- namespace code {set v}
- }]
-} {42}
+test namespace-22.6 {NamespaceCodeCmd, in other namespace} {
+ namespace eval test_ns_1 {
+ variable v 42
+ }
+ namespace eval test_ns_2 {
+ proc namespace args {}
+ }
+ namespace eval test_ns_2 [namespace eval test_ns_1 {
+ namespace code {set v}
+ }]
+} {42}
test namespace-22.7 {NamespaceCodeCmd, Bug 3202171} {
namespace eval demo {
proc namespace args {puts $args}
@@ -1659,7 +1659,7 @@ test namespace-40.1 {Ignoring namespace proc "unknown"} -setup {
namespace eval ns {proc unknown args {return local}}
list [namespace eval ns aaa bbb] [namespace eval ns aaa]
} -cleanup {
- rename unknown {}
+ rename unknown {}
rename _unknown unknown
namespace delete ns
} -result {global global}
@@ -1670,7 +1670,7 @@ test namespace-41.1 {Shadowing byte-compiled commands, Bug: 231259} {
set res {}
proc test {} {
set ::g 0
- }
+ }
lappend ::res [test]
proc set {a b} {
::set a [incr b]
@@ -2797,9 +2797,9 @@ test namespace-51.15 {namespace resolution path control} -body {
namespace delete ::test_ns_2
}
test namespace-51.16 {Bug 1566526} {
- interp create slave
- slave eval namespace eval demo namespace path ::
- interp delete slave
+ interp create child
+ child eval namespace eval demo namespace path ::
+ interp delete child
} {}
test namespace-51.17 {resolution epoch handling: Bug 2898722} -setup {
set result {}
@@ -3000,19 +3000,19 @@ test namespace-52.11 {unknown: with TCL_EVAL_INVOKE} -setup {
}
}
catch {rename ::noSuchCommand {}}
- set ::slave [interp create]
+ set ::child [interp create]
} -body {
- $::slave alias bar noSuchCommand
+ $::child alias bar noSuchCommand
namespace eval test_ns_1 {
namespace unknown unknown
proc unknown args {
return FAIL
}
- $::slave eval bar
+ $::child eval bar
}
} -cleanup {
- interp delete $::slave
- unset ::slave
+ interp delete $::child
+ unset ::child
namespace delete test_ns_1
rename ::unknown {}
rename unknown.save ::unknown
@@ -3373,7 +3373,7 @@ test namespace-57.0 {
rename ns2::p2 {}
return $res
} -cleanup {
- unset res
+ unset res
namespace delete ns2
namespace delete ns3
} -result success