summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorpooryorick <com.digitalsmarties@pooryorick.com>2016-07-18 05:49:48 (GMT)
committerpooryorick <com.digitalsmarties@pooryorick.com>2016-07-18 05:49:48 (GMT)
commit19ae84136c8b20a3062fc02e9f4f78511e1168d7 (patch)
tree28d2fde9d27e55c9c818aad17ac81c5f6def321f /tests
parent9cc388df3d06570e47d68f284a74f4fa26b45426 (diff)
downloadtcl-19ae84136c8b20a3062fc02e9f4f78511e1168d7.zip
tcl-19ae84136c8b20a3062fc02e9f4f78511e1168d7.tar.gz
tcl-19ae84136c8b20a3062fc02e9f4f78511e1168d7.tar.bz2
NRE-enable [package ifneeded] scripts.pyk_pkgrequirenre
Diffstat (limited to 'tests')
-rw-r--r--tests/load.test4
-rw-r--r--tests/package.test12
-rw-r--r--tests/unload.test6
3 files changed, 17 insertions, 5 deletions
diff --git a/tests/load.test b/tests/load.test
index 9536271..1f1c698 100644
--- a/tests/load.test
+++ b/tests/load.test
@@ -212,8 +212,8 @@ test load-9.1 {Tcl_StaticPackage, load already-loaded package into another inter
test load-10.1 {load from vfs} \
-constraints [list $dll $loaded testsimplefilesystem] \
-setup {set dir [pwd]; cd $testDir; testsimplefilesystem 1} \
- -body {list [catch {load simplefs:/pkgd$ext pkgd} msg] $msg} \
- -result {0 {}} \
+ -body {list [catch {load simplefs:/pkgd$ext pkgd} msg]} \
+ -result 0 \
-cleanup {testsimplefilesystem 0; cd $dir; unset dir}
test load-11.1 {Load TclOO extension using Stubs (Bug [f51efe99a7])} \
diff --git a/tests/package.test b/tests/package.test
index 49346d8..9334f0e 100644
--- a/tests/package.test
+++ b/tests/package.test
@@ -605,6 +605,18 @@ test package-3.52 {Tcl_PkgRequire procedure, picking best stable version} -setup
package require t
return $x
} -result {1.3}
+test package-3.53 {Tcl_PkgRequire procedure, coroutine support} -setup {
+ package forget t
+} -body {
+ coroutine coro1 apply {{} {
+ package ifneeded t 2.1 {
+ yield
+ package provide t 2.1
+ }
+ package require t 2.1
+ }}
+ list [catch {coro1} msg] $msg
+} -match glob -result {0 2.1}
test package-4.1 {Tcl_PackageCmd procedure} -returnCodes error -body {
package
diff --git a/tests/unload.test b/tests/unload.test
index 5a374c4..32e91d9 100644
--- a/tests/unload.test
+++ b/tests/unload.test
@@ -78,7 +78,7 @@ test unload-2.1 {basic loading of non-unloadable package, with guess for package
} {0 {pkga_eq pkga_quote}}
test unload-2.2 {basic loading of unloadable package, with guess for package name} [list $dll $loaded] {
list $pkgua_loaded $pkgua_detached $pkgua_unloaded \
- [load [file join $testDir pkgua$ext]] \
+ [load [file join $testDir pkgua$ext]; list] \
[pkgua_eq abc def] [lsort [info commands pkgua_*]] \
$pkgua_loaded $pkgua_detached $pkgua_unloaded
} {{} {} {} {} 0 {pkgua_eq pkgua_quote} . {} {}}
@@ -94,7 +94,7 @@ test unload-2.4 {basic unloading of unloadable package, with guess for package n
} {. {} {} {} {} . . .}
test unload-2.5 {reloading of unloaded package, with guess for package name} [list $dll $loaded] {
list $pkgua_loaded $pkgua_detached $pkgua_unloaded \
- [load [file join $testDir pkgua$ext]] \
+ [load [file join $testDir pkgua$ext]; list] \
[pkgua_eq abc def] [lsort [info commands pkgua_*]] \
$pkgua_loaded $pkgua_detached $pkgua_unloaded
} {. . . {} 0 {pkgua_eq pkgua_quote} .. . .}
@@ -171,7 +171,7 @@ child-trusted eval {
test unload-4.1 {loading of unloadable package in trusted interpreter, with guess for package name} \
[list $dll $loaded] {
list [list $pkgua_loaded $pkgua_detached $pkgua_unloaded] \
- [load [file join $testDir pkgua$ext]] \
+ [load [file join $testDir pkgua$ext]; list] \
[pkgua_eq abc def] [lsort [info commands pkgua_*]] \
[list $pkgua_loaded $pkgua_detached $pkgua_unloaded]
} {{.. .. ..} {} 0 {pkgua_eq pkgua_quote} {... .. ..}}