summaryrefslogtreecommitdiffstats
path: root/tests/safe.test
diff options
context:
space:
mode:
authornijtmans <nijtmans>2009-11-19 21:17:36 (GMT)
committernijtmans <nijtmans>2009-11-19 21:17:36 (GMT)
commit1aaac758c94c12834f8bf77eadc30e212bc186f4 (patch)
tree17c64145a2321c7f3db5dff18b0042d1a861aa75 /tests/safe.test
parent9d243a7d2ffa0988a6dc1316cecf69e776b75bae (diff)
downloadtcl-1aaac758c94c12834f8bf77eadc30e212bc186f4.zip
tcl-1aaac758c94c12834f8bf77eadc30e212bc186f4.tar.gz
tcl-1aaac758c94c12834f8bf77eadc30e212bc186f4.tar.bz2
Test-case for fixed [Bug 2849797]
Fix safe-10.1 and safe-10.4 test cases, making the wrong assumption that Tcltest should be a static package.
Diffstat (limited to 'tests/safe.test')
-rw-r--r--tests/safe.test15
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/safe.test b/tests/safe.test
index 22ef475..786cafb 100644
--- a/tests/safe.test
+++ b/tests/safe.test
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: safe.test,v 1.26 2009/11/05 20:15:36 andreas_kupries Exp $
+# RCS: @(#) $Id: safe.test,v 1.27 2009/11/19 21:17:36 nijtmans Exp $
package require Tcl 8.5
@@ -376,34 +376,35 @@ if {[catch {package require Tcltest} msg]} {
# we use the Tcltest package , which has no Safe_Init
}
+teststaticpkg Safepkg1 0 0
test safe-10.1 {testing statics loading} TcltestPackage {
set i [safe::interpCreate]
list \
- [catch {interp eval $i {load {} Tcltest}} msg] \
+ [catch {interp eval $i {load {} Safepkg1}} msg] \
$msg \
[safe::interpDelete $i];
-} {1 {can't use package in a safe interpreter: no Tcltest_SafeInit procedure} {}}
+} {1 {can't use package in a safe interpreter: no Safepkg1_SafeInit procedure} {}}
test safe-10.2 {testing statics loading / -nostatics} TcltestPackage {
set i [safe::interpCreate -nostatics]
list \
- [catch {interp eval $i {load {} Tcltest}} msg] \
+ [catch {interp eval $i {load {} Safepkg1}} msg] \
$msg \
[safe::interpDelete $i];
} {1 {permission denied (static package)} {}}
test safe-10.3 {testing nested statics loading / no nested by default} TcltestPackage {
set i [safe::interpCreate]
list \
- [catch {interp eval $i {interp create x; load {} Tcltest x}} msg] \
+ [catch {interp eval $i {interp create x; load {} Safepkg1 x}} msg] \
$msg \
[safe::interpDelete $i];
} {1 {permission denied (nested load)} {}}
test safe-10.4 {testing nested statics loading / -nestedloadok} TcltestPackage {
set i [safe::interpCreate -nestedloadok]
list \
- [catch {interp eval $i {interp create x; load {} Tcltest x}} msg] \
+ [catch {interp eval $i {interp create x; load {} Safepkg1 x}} msg] \
$msg \
[safe::interpDelete $i];
-} {1 {can't use package in a safe interpreter: no Tcltest_SafeInit procedure} {}}
+} {1 {can't use package in a safe interpreter: no Safepkg1_SafeInit procedure} {}}
test safe-11.1 {testing safe encoding} {
set i [safe::interpCreate]