diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2018-09-27 11:06:59 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2018-09-27 11:06:59 (GMT) |
commit | 6ec7c04557d86c9e5ddec92b3594634dba89e007 (patch) | |
tree | 616920c66a387ef483f073ca812179a6cb5d8069 /tests | |
parent | bfdc5233ebf3c77c4d276dbc6933ed0b1df4965a (diff) | |
download | tcl-6ec7c04557d86c9e5ddec92b3594634dba89e007.zip tcl-6ec7c04557d86c9e5ddec92b3594634dba89e007.tar.gz tcl-6ec7c04557d86c9e5ddec92b3594634dba89e007.tar.bz2 |
Restricted the information made available to safe interpreters a bit.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/info.test | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/info.test b/tests/info.test index 62405bf..0de1510 100644 --- a/tests/info.test +++ b/tests/info.test @@ -2518,6 +2518,49 @@ test info-40.16 {info cmdtype: dynamic behavior} -setup { catch {rename bar {}} } } -result {0 1 ::testinfocmdtype::foo {} ::testinfocmdtype::bar 1 0} +test info-40.17 {info cmdtype: aliases in slave interpreters} -setup { + set i [interp create] +} -body { + $i alias foo gorp + $i eval { + info cmdtype foo + } +} -cleanup { + interp delete $i +} -result alias +test info-40.18 {info cmdtype: aliases in slave interpreters} -setup { + set safe [interp create -safe] +} -body { + $safe alias foo gorp + $safe eval { + info cmdtype foo + } +} -cleanup { + interp delete $safe +} -result native +test info-40.19 {info cmdtype: aliases in slave interpreters} -setup { + set safe [interp create -safe] +} -body { + set inner [interp create [list $safe bar]] + interp alias $inner foo $safe gorp + $safe eval { + bar eval { + info cmdtype foo + } + } +} -cleanup { + interp delete $safe +} -result native +test info-40.20 {info cmdtype: aliases in slave interpreters} -setup { + set safe [interp create -safe] +} -body { + $safe eval { + interp alias {} foo {} gorp + info cmdtype foo + } +} -cleanup { + interp delete $safe +} -result alias namespace delete ::testinfocmdtype # ------------------------------------------------------------------------- |