summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorkjnash <k.j.nash@usa.net>2020-07-21 17:25:03 (GMT)
committerkjnash <k.j.nash@usa.net>2020-07-21 17:25:03 (GMT)
commit14cfbc651c24aa44c83023e8bba2781d322b230f (patch)
tree3481d47f6619a11f37dd92b16fdbbdebada2e233 /tests
parent204434e4d41bb9e07b48d28331a6a63206dc36dd (diff)
downloadtcl-14cfbc651c24aa44c83023e8bba2781d322b230f.zip
tcl-14cfbc651c24aa44c83023e8bba2781d322b230f.tar.gz
tcl-14cfbc651c24aa44c83023e8bba2781d322b230f.tar.bz2
Adapt Safe Base for interpreter names with namespace separators. Add a test and revise safe(n). Fixes bug [693851].
Diffstat (limited to 'tests')
-rw-r--r--tests/safe.test17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/safe.test b/tests/safe.test
index 3511625..1415b09 100644
--- a/tests/safe.test
+++ b/tests/safe.test
@@ -362,6 +362,23 @@ test safe-7.3 {check that safe subinterpreters work} {
list $g $h [interp eval $j {join {o k} ""}] [safe::interpDelete $i] \
[interp exists $j] [info vars ::safe::S*]
} {{} {} ok {} 0 {}}
+test safe-7.3.1 {check that safe subinterpreters work with namespace names} -setup {
+} -body {
+ set g [interp slaves]
+ if {$g ne {}} {
+ append g { -- residue of an earlier test}
+ }
+ set h [info vars ::safe::S*]
+ if {$h ne {}} {
+ append h { -- residue of an earlier test}
+ }
+ set i [safe::interpCreate foo::bar]
+ set j [safe::interpCreate [list $i hello::world]]
+ list $g $h [interp eval $j {join {o k} ""}] \
+ [foo::bar eval {hello::world eval {join {o k} ""}}] \
+ [safe::interpDelete $i] \
+ [interp exists $j] [info vars ::safe::S*]
+} -match glob -result {{} {} ok ok {} 0 {}}
test safe-7.4 {tests specific path and positive search} -setup {
} -body {
set i [safe::interpCreate -nostat -nested 1 -accessPath [list [info library]]]