summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-04-08 08:56:38 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-04-08 08:56:38 (GMT)
commitc7711541ec0591b6046a0bcdc6865032c8b42614 (patch)
tree529e52a202e9015021151f84f9edce950fd52e26 /tests
parentc6799de46b6357be28e9de7cf3bcb0e78b1d1735 (diff)
parent0b8bd5406326f887d15a55b9056d03f1b8068b99 (diff)
downloadtcl-c7711541ec0591b6046a0bcdc6865032c8b42614.zip
tcl-c7711541ec0591b6046a0bcdc6865032c8b42614.tar.gz
tcl-c7711541ec0591b6046a0bcdc6865032c8b42614.tar.bz2
Merge 8.7
Diffstat (limited to 'tests')
-rw-r--r--tests/load.test68
-rw-r--r--tests/safe.test2
2 files changed, 35 insertions, 35 deletions
diff --git a/tests/load.test b/tests/load.test
index 0ea96ce..40901e5 100644
--- a/tests/load.test
+++ b/tests/load.test
@@ -36,9 +36,9 @@ testConstraint $loaded [expr {![string match *pkga* $alreadyLoaded]}]
set alreadyTotalLoaded [info loaded]
-# Certain tests require the 'teststaticpkg' command from tcltest
+# Certain tests require the 'teststaticlibrary' command from tcltest
-testConstraint teststaticpkg [llength [info commands teststaticpkg]]
+testConstraint teststaticlibrary [llength [info commands teststaticlibrary]]
# Test load-10.1 requires the 'testsimplefilesystem' command from tcltest
@@ -150,78 +150,78 @@ test load-6.1 {errors loading file} [list $dll $loaded] {
catch {load foo foo}
} {1}
-test load-7.1 {Tcl_StaticPackage procedure} [list teststaticpkg] {
+test load-7.1 {Tcl_StaticLibrary procedure} [list teststaticlibrary] {
set x "not loaded"
- teststaticpkg Test 1 0
+ teststaticlibrary Test 1 0
load {} test
load {} test child
list [set x] [child eval set x]
} {loaded loaded}
-test load-7.2 {Tcl_StaticPackage procedure} [list teststaticpkg] {
+test load-7.2 {Tcl_StaticLibrary procedure} [list teststaticlibrary] {
set x "not loaded"
- teststaticpkg Another 0 0
+ teststaticlibrary Another 0 0
load {} Another
child eval {set x "not loaded"}
list [catch {load {} Another child} msg] $msg \
[child eval set x] [set x]
} {1 {can't use library in a safe interpreter: no Another_SafeInit procedure} {not loaded} loaded}
-test load-7.3 {Tcl_StaticPackage procedure} [list teststaticpkg] {
+test load-7.3 {Tcl_StaticLibrary procedure} [list teststaticlibrary] {
set x "not loaded"
- teststaticpkg More 0 1
+ teststaticlibrary More 0 1
load {} more
set x
} {not loaded}
catch {load [file join $testDir pkga$ext] Pkga}
catch {load [file join $testDir pkgb$ext] Pkgb}
catch {load [file join $testDir pkge$ext] Pkge}
-set currentRealPackages [list [list [file join $testDir pkge$ext] Pkge] [list [file join $testDir pkgb$ext] Pkgb] [list [file join $testDir pkga$ext] Pkga]]
-test load-7.4 {Tcl_StaticPackage procedure, redundant calls} -setup {
- teststaticpkg Test 1 0
- teststaticpkg Another 0 0
- teststaticpkg More 0 1
-} -constraints [list teststaticpkg $dll $loaded] -body {
- teststaticpkg Double 0 1
- teststaticpkg Double 0 1
+set currentRealLibraries [list [list [file join $testDir pkge$ext] Pkge] [list [file join $testDir pkgb$ext] Pkgb] [list [file join $testDir pkga$ext] Pkga]]
+test load-7.4 {Tcl_StaticLibrary procedure, redundant calls} -setup {
+ teststaticlibrary Test 1 0
+ teststaticlibrary Another 0 0
+ teststaticlibrary More 0 1
+} -constraints [list teststaticlibrary $dll $loaded] -body {
+ teststaticlibrary Double 0 1
+ teststaticlibrary Double 0 1
info loaded
-} -result [list {{} Double} {{} More} {{} Another} {{} Test} {*}$currentRealPackages {*}$alreadyTotalLoaded]
+} -result [list {{} Double} {{} More} {{} Another} {{} Test} {*}$currentRealLibraries {*}$alreadyTotalLoaded]
-testConstraint teststaticpkg_8.x 0
-if {[testConstraint teststaticpkg]} {
+testConstraint teststaticlibrary_8.x 0
+if {[testConstraint teststaticlibrary]} {
catch {
- teststaticpkg Test 1 1
- teststaticpkg Another 0 1
- teststaticpkg More 0 1
- teststaticpkg Double 0 1
- testConstraint teststaticpkg_8.x 1
+ teststaticlibrary Test 1 1
+ teststaticlibrary Another 0 1
+ teststaticlibrary More 0 1
+ teststaticlibrary Double 0 1
+ testConstraint teststaticlibrary_8.x 1
}
}
-test load-8.1 {TclGetLoadedPackages procedure} [list teststaticpkg_8.x $dll $loaded] {
+test load-8.1 {TclGetLoadedLibraries procedure} [list teststaticlibrary_8.x $dll $loaded] {
lsort -index 1 [info loaded]
-} [lsort -index 1 [list {{} Double} {{} More} {{} Another} {{} Test} {*}$currentRealPackages {*}$alreadyTotalLoaded]]
-test load-8.2 {TclGetLoadedPackages procedure} -constraints {teststaticpkg_8.x} -body {
+} [lsort -index 1 [list {{} Double} {{} More} {{} Another} {{} Test} {*}$currentRealLibraries {*}$alreadyTotalLoaded]]
+test load-8.2 {TclGetLoadedLibraries procedure} -constraints {teststaticlibrary_8.x} -body {
info loaded gorp
} -returnCodes error -result {could not find interpreter "gorp"}
-test load-8.3a {TclGetLoadedPackages procedure} [list teststaticpkg_8.x $dll $loaded] {
+test load-8.3a {TclGetLoadedLibraries procedure} [list teststaticlibrary_8.x $dll $loaded] {
lsort -index 1 [info loaded {}]
} [lsort -index 1 [list {{} Double} {{} More} {{} Another} {{} Test} [list [file join $testDir pkga$ext] Pkga] [list [file join $testDir pkgb$ext] Pkgb] {*}$alreadyLoaded]]
-test load-8.3b {TclGetLoadedPackages procedure} [list teststaticpkg_8.x $dll $loaded] {
+test load-8.3b {TclGetLoadedLibraries procedure} [list teststaticlibrary_8.x $dll $loaded] {
lsort -index 1 [info loaded child]
} [lsort -index 1 [list {{} Test} [list [file join $testDir pkgb$ext] Pkgb]]]
-test load-8.4 {TclGetLoadedPackages procedure} [list teststaticpkg_8.x $dll $loaded] {
+test load-8.4 {TclGetLoadedLibraries procedure} [list teststaticlibrary_8.x $dll $loaded] {
load [file join $testDir pkgb$ext] Pkgb
list [lsort -index 1 [info loaded {}]] [lsort [info commands pkgb_*]]
} [list [lsort -index 1 [concat [list [list [file join $testDir pkgb$ext] Pkgb] {{} Double} {{} More} {{} Another} {{} Test} [list [file join $testDir pkga$ext] Pkga]] $alreadyLoaded]] {pkgb_demo pkgb_sub pkgb_unsafe}]
interp delete child
-test load-9.1 {Tcl_StaticPackage, load already-loaded package into another interp} -setup {
+test load-9.1 {Tcl_StaticLibrary, load already-loaded package into another interp} -setup {
interp create child1
interp create child2
load {} Tcltest child1
load {} Tcltest child2
-} -constraints {teststaticpkg} -body {
- child1 eval { teststaticpkg Loadninepointone 0 1 }
- child2 eval { teststaticpkg Loadninepointone 0 1 }
+} -constraints {teststaticlibrary} -body {
+ child1 eval { teststaticlibrary Loadninepointone 0 1 }
+ child2 eval { teststaticlibrary Loadninepointone 0 1 }
list [child1 eval { info loaded {} }] \
[child2 eval { info loaded {} }]
} -match glob -cleanup {
diff --git a/tests/safe.test b/tests/safe.test
index 8fca594..f3a6565 100644
--- a/tests/safe.test
+++ b/tests/safe.test
@@ -1159,7 +1159,7 @@ test safe-9.24 {interpConfigure change the access path; check module loading; st
res0 res1 res2}
# See comments on lsort after test safe-9.20.
-catch {teststaticpkg Safepfx1 0 0}
+catch {teststaticlibrary Safepfx1 0 0}
test safe-10.1 {testing statics loading} -constraints tcl::test -setup {
set i [safe::interpCreate]
} -body {