20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
-
+
|
foreach i [interp slaves] {
interp delete $i
}
set saveAutoPath $::auto_path
set ::auto_path [info library]
# Force actual loading of the safe package
# Force actual loading of the safe package
# because we use un exported (and thus un-autoindexed) APIs
# in this test result arguments:
catch {safe::interpConfigure}
proc equiv {x} {return $x}
test safe-1.1 {safe::interpConfigure syntax} {
|
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
-
+
|
set l [a aliases]
interp delete a
lsort $l
} {::tcl::mathfunc::max ::tcl::mathfunc::min clock}
test safe-3.1 {calling safe::interpInit is safe} {
catch {safe::interpDelete a}
interp create a -safe
interp create a -safe
safe::interpInit a
catch {interp eval a exec ls} msg
safe::interpDelete a
set msg
} {invalid command name "exec"}
test safe-3.2 {calling safe::interpCreate on trusted interp} {
catch {safe::interpDelete a}
|