summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-11-04 08:55:50 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-11-04 08:55:50 (GMT)
commitefe33a9fd944a5b41f05a2b571d462b536ad2e57 (patch)
tree65e29b5d09738cc2e3ad28635b2c12b6b35ae700
parentce3437bf88fd92c384b8a1f5af837b8854e9e14b (diff)
downloadtcl-efe33a9fd944a5b41f05a2b571d462b536ad2e57.zip
tcl-efe33a9fd944a5b41f05a2b571d462b536ad2e57.tar.gz
tcl-efe33a9fd944a5b41f05a2b571d462b536ad2e57.tar.bz2
Vary dltest package names for test purposes
-rw-r--r--tests/load.test18
-rw-r--r--tests/unload.test4
-rw-r--r--unix/dltest/pkgb.c6
-rw-r--r--unix/dltest/pkgd.c6
4 files changed, 17 insertions, 17 deletions
diff --git a/tests/load.test b/tests/load.test
index 674d2a5..c97a5b5 100644
--- a/tests/load.test
+++ b/tests/load.test
@@ -78,7 +78,7 @@ test load-2.1 {basic loading, with guess for package name} \
interp create -safe child
test load-2.2 {loading into a safe interpreter, with package name conversion} \
[list $dll $loaded] {
- load -lazy [file join $testDir pkgb$ext] pkgb child
+ load -lazy [file join $testDir pkgb$ext] Pkgb child
list [child eval pkgb_sub 44 13] [catch {child eval pkgb_unsafe} msg] $msg \
[catch {pkgb_sub 12 10} msg2] $msg2
} {31 1 {invalid command name "pkgb_unsafe"} 1 {invalid command name "pkgb_sub"}}
@@ -127,7 +127,7 @@ test load-4.1 {reloading package into same interpreter} [list $dll $loaded] {
test load-4.2 {reloading package into same interpreter} -setup {
catch {load [file join $testDir pkga$ext] pkga}
} -constraints [list $dll $loaded] -returnCodes error -body {
- load [file join $testDir pkga$ext] pkgb
+ load [file join $testDir pkga$ext] Pkgb
} -result "file \"[file join $testDir pkga$ext]\" is already loaded for package \"pkga\""
test load-5.1 {file name not specified and no static package: pick default} -setup {
@@ -172,9 +172,9 @@ test load-7.3 {Tcl_StaticPackage procedure} [list teststaticpkg] {
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 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]]
+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
@@ -204,14 +204,14 @@ test load-8.2 {TclGetLoadedPackages procedure} -constraints {teststaticpkg_8.x}
} -returnCodes error -result {could not find interpreter "gorp"}
test load-8.3a {TclGetLoadedPackages procedure} [list teststaticpkg_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]]
+} [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] {
lsort -index 1 [info loaded child]
-} [lsort -index 1 [list {{} test} [list [file join $testDir pkgb$ext] pkgb]]]
+} [lsort -index 1 [list {{} test} [list [file join $testDir pkgb$ext] Pkgb]]]
test load-8.4 {TclGetLoadedPackages procedure} [list teststaticpkg_8.x $dll $loaded] {
- load [file join $testDir pkgb$ext] pkgb
+ 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}]
+} [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 {
@@ -234,7 +234,7 @@ test load-10.1 {load from vfs} -setup {
cd $testDir
testsimplefilesystem 1
} -constraints [list $dll $loaded testsimplefilesystem] -body {
- list [catch {load simplefs:/pkgd$ext pkgd} msg] $msg
+ list [catch {load simplefs:/pkgd$ext PKGD} msg] $msg
} -result {0 {}} -cleanup {
testsimplefilesystem 0
cd $dir
diff --git a/tests/unload.test b/tests/unload.test
index ca007ef..b883257 100644
--- a/tests/unload.test
+++ b/tests/unload.test
@@ -138,7 +138,7 @@ child eval {
test unload-3.1 {basic loading of non-unloadable package in a safe interpreter} \
[list $dll $loaded] {
catch {rename pkgb_sub {}}
- load [file join $testDir pkgb$ext] pkgb child
+ load [file join $testDir pkgb$ext] Pkgb child
list [child eval pkgb_sub 44 13] [catch {child eval pkgb_unsafe} msg] $msg \
[catch {pkgb_sub 12 10} msg2] $msg2
} {31 1 {invalid command name "pkgb_unsafe"} 1 {invalid command name "pkgb_sub"}}
@@ -157,7 +157,7 @@ test unload-3.3 {unloading of a package that has never been loaded from a safe i
} -result {file "*" has never been loaded in this interpreter}
test unload-3.4 {basic unloading of a non-unloadable package from a safe interpreter, with guess for package name} -setup {
if {[lsearch -index 1 [info loaded child] Pkgb] < 0} {
- load [file join $testDir pkgb$ext] pkgb child
+ load [file join $testDir pkgb$ext] Pkgb child
}
} -constraints [list $dll $loaded] -returnCodes error -match glob -body {
unload [file join $testDir pkgb$ext] {} child
diff --git a/unix/dltest/pkgb.c b/unix/dltest/pkgb.c
index 8d8d123..741b2a1 100644
--- a/unix/dltest/pkgb.c
+++ b/unix/dltest/pkgb.c
@@ -1,7 +1,7 @@
/*
* pkgb.c --
*
- * This file contains a simple Tcl package "pkgb" that is intended for
+ * This file contains a simple Tcl package "Pkgb" that is intended for
* testing the Tcl dynamic loading facilities. It can be used in both
* safe and unsafe interpreters.
*
@@ -152,7 +152,7 @@ Pkgb_Init(
if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) {
return TCL_ERROR;
}
- code = Tcl_PkgProvide(interp, "pkgb", "2.3");
+ code = Tcl_PkgProvide(interp, "Pkgb", "2.3");
if (code != TCL_OK) {
return code;
}
@@ -189,7 +189,7 @@ Pkgb_SafeInit(
if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) {
return TCL_ERROR;
}
- code = Tcl_PkgProvide(interp, "pkgb", "2.3");
+ code = Tcl_PkgProvide(interp, "Pkgb", "2.3");
if (code != TCL_OK) {
return code;
}
diff --git a/unix/dltest/pkgd.c b/unix/dltest/pkgd.c
index d64c807..d3af83f 100644
--- a/unix/dltest/pkgd.c
+++ b/unix/dltest/pkgd.c
@@ -1,7 +1,7 @@
/*
* pkgd.c --
*
- * This file contains a simple Tcl package "pkgd" that is intended for
+ * This file contains a simple Tcl package "PKGD" that is intended for
* testing the Tcl dynamic loading facilities. It can be used in both
* safe and unsafe interpreters.
*
@@ -121,7 +121,7 @@ Pkgd_Init(
if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) {
return TCL_ERROR;
}
- code = Tcl_PkgProvide(interp, "pkgd", "7.3");
+ code = Tcl_PkgProvide(interp, "PKGD", "7.3");
if (code != TCL_OK) {
return code;
}
@@ -158,7 +158,7 @@ Pkgd_SafeInit(
if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) {
return TCL_ERROR;
}
- code = Tcl_PkgProvide(interp, "pkgd", "7.3");
+ code = Tcl_PkgProvide(interp, "PKGD", "7.3");
if (code != TCL_OK) {
return code;
}