summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-05-20 12:26:27 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-05-20 12:26:27 (GMT)
commit3a1e4084649144c296b41ac714553bad357782d2 (patch)
tree21a1c32f80251883c14687992788cdf502475b35
parentd80a12f06122cfef8370e25e4bfe14d180130f7e (diff)
downloadtcl-3a1e4084649144c296b41ac714553bad357782d2.zip
tcl-3a1e4084649144c296b41ac714553bad357782d2.tar.gz
tcl-3a1e4084649144c296b41ac714553bad357782d2.tar.bz2
Make all "pkg?" package names lowercase (was: ""Pkg?"), as we now recommend lowercase package names. Let's provide good examples then.
-rw-r--r--tests/load.test32
-rw-r--r--tests/pkgMkIndex.test8
-rw-r--r--tests/unload.test20
-rw-r--r--unix/dltest/pkga.c2
-rw-r--r--unix/dltest/pkgb.c6
-rw-r--r--unix/dltest/pkgc.c4
-rw-r--r--unix/dltest/pkgd.c4
-rw-r--r--unix/dltest/pkgooa.c2
-rw-r--r--unix/dltest/pkgua.c2
9 files changed, 40 insertions, 40 deletions
diff --git a/tests/load.test b/tests/load.test
index b13f1f4..728fad9 100644
--- a/tests/load.test
+++ b/tests/load.test
@@ -5,7 +5,7 @@
# generates output for errors. No output means no errors were found.
#
# Copyright (c) 1995 Sun Microsystems, Inc.
-# Copyright (c) 1998-1999 by Scriptics Corporation.
+# Copyright (c) 1998-1999 Scriptics Corporation.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -78,13 +78,13 @@ 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"}}
test load-2.3 {loading with no _Init procedure} -constraints [list $dll $loaded] \
-body {
- list [catch {load [file join $testDir pkgc$ext] foo} msg] $msg $errorCode
+ list [catch {load [file join $testDir pkgc$ext] Foo} msg] $msg $errorCode
} -match glob \
-result [list 1 {cannot find symbol "Foo_Init"*} \
{TCL LOOKUP LOAD_SYMBOL *Foo_Init}]
@@ -94,7 +94,7 @@ test load-2.4 {loading with no _SafeInit procedure} [list $dll $loaded] {
test load-3.1 {error in _Init procedure, same interpreter} \
[list $dll $loaded] {
- list [catch {load [file join $testDir pkge$ext] pkge} msg] \
+ list [catch {load [file join $testDir pkge$ext] Pkge} msg] \
$msg $::errorInfo $::errorCode
} {1 {couldn't open "non_existent": no such file or directory} {couldn't open "non_existent": no such file or directory
while executing
@@ -102,14 +102,14 @@ test load-3.1 {error in _Init procedure, same interpreter} \
invoked from within
"if 44 {open non_existent}"
invoked from within
-"load [file join $testDir pkge$ext] pkge"} {POSIX ENOENT {no such file or directory}}}
+"load [file join $testDir pkge$ext] Pkge"} {POSIX ENOENT {no such file or directory}}}
test load-3.2 {error in _Init procedure, child interpreter} \
[list $dll $loaded] {
catch {interp delete x}
interp create x
set ::errorCode foo
set ::errorInfo bar
- set result [list [catch {load [file join $testDir pkge$ext] pkge x} msg] \
+ set result [list [catch {load [file join $testDir pkge$ext] Pkge x} msg] \
$msg $::errorInfo $::errorCode]
interp delete x
set result
@@ -119,23 +119,23 @@ test load-3.2 {error in _Init procedure, child interpreter} \
invoked from within
"if 44 {open non_existent}"
invoked from within
-"load [file join $testDir pkge$ext] pkge x"} {POSIX ENOENT {no such file or directory}}}
+"load [file join $testDir pkge$ext] Pkge x"} {POSIX ENOENT {no such file or directory}}}
test load-4.1 {reloading package into same interpreter} [list $dll $loaded] {
- list [catch {load [file join $testDir pkga$ext] pkga} msg] $msg
+ list [catch {load [file join $testDir pkga$ext] Pkga} msg] $msg
} {0 {}}
test load-4.2 {reloading package into same interpreter} -setup {
- catch {load [file join $testDir pkga$ext] pkga}
+ 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 {
catch {interp delete x}
interp create x
} -constraints [list $dll $loaded] -body {
- load -global [file join $testDir pkga$ext] pkga
- load {} pkga x
+ load -global [file join $testDir pkga$ext] Pkga
+ load {} Pkga x
info loaded x
} -cleanup {
interp delete x
@@ -171,9 +171,9 @@ test load-7.3 {Tcl_StaticPackage procedure} [list teststaticpkg] {
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}
+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
@@ -209,7 +209,7 @@ test load-8.3b {TclGetLoadedPackages procedure} [list teststaticpkg_8.x $dll $lo
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] {
- 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}]
interp delete child
diff --git a/tests/pkgMkIndex.test b/tests/pkgMkIndex.test
index ad328f8..79e0f2e 100644
--- a/tests/pkgMkIndex.test
+++ b/tests/pkgMkIndex.test
@@ -5,7 +5,7 @@
# Sourcing this file into Tcl runs the tests and generates output for errors.
# No output means no errors were found.
#
-# Copyright (c) 1998-1999 by Scriptics Corporation.
+# Copyright (c) 1998-1999 Scriptics Corporation.
# All rights reserved.
if {"::tcltest" ni [namespace children]} {
@@ -559,8 +559,8 @@ testConstraint $dll [file exists $x]
if {[testConstraint $dll]} {
makeFile {
-# This package provides Pkga, which is also provided by a DLL.
-package provide Pkga 1.0
+# This package provides pkga, which is also provided by a DLL.
+package provide pkga 1.0
proc pkga_neq { x } {
return [expr {! [pkgq_eq $x]}]
}
@@ -576,7 +576,7 @@ test pkgMkIndex-10.1 {package in DLL and script} [list exec $dll] {
set cmd [list pkg_mkIndex -lazy $fullPkgPath [file tail $x] pkga.tcl]
exec [interpreter] << $cmd
pkgtest::runCreatedIndex {0 {}} -lazy $fullPkgPath pkga[info sharedlibextension] pkga.tcl
-} "0 {{Pkga:1.0 {tclPkgSetup {pkga[info sharedlibextension] load {pkga_eq pkga_quote}} {pkga.tcl source pkga_neq}}}}"
+} "0 {{pkga:1.0 {tclPkgSetup {pkga[info sharedlibextension] load {pkga_eq pkga_quote}} {pkga.tcl source pkga_neq}}}}"
test pkgMkIndex-10.2 {package in DLL hidden by -load} [list exec $dll] {
# Do all [load]ing of shared libraries in another process, so we can
# delete the file and not get stuck because we're holding a reference to
diff --git a/tests/unload.test b/tests/unload.test
index 32767fa..0b10492 100644
--- a/tests/unload.test
+++ b/tests/unload.test
@@ -5,8 +5,8 @@
# generates output for errors. No output means no errors were found.
#
# Copyright (c) 1995 Sun Microsystems, Inc.
-# Copyright (c) 1998-1999 by Scriptics Corporation.
-# Copyright (c) 2003-2004 by Georgios Petasis
+# Copyright (c) 1998-1999 Scriptics Corporation.
+# Copyright (c) 2003-2004 Georgios Petasis
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -135,14 +135,14 @@ child eval {
test unload-3.1 {basic loading of non-unloadable package in a safe interpreter, with package name conversion} \
[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"}}
test unload-3.2 {basic loading of unloadable package in a safe interpreter, with package name conversion} \
[list $dll $loaded] {
list [child eval {list $pkgua_loaded $pkgua_detached $pkgua_unloaded}] \
- [load [file join $testDir pkgua$ext] pKgUA child] \
+ [load [file join $testDir pkgua$ext] Pkgua child] \
[child eval pkgua_eq abc def] \
[lsort [child eval info commands pkgua_*]] \
[child eval {list $pkgua_loaded $pkgua_detached $pkgua_unloaded}]
@@ -154,14 +154,14 @@ 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
} -result {file "*" cannot be unloaded under a safe interpreter}
test unload-3.5 {basic unloading of an unloadable package from a safe interpreter, with guess for package name} -setup {
if {[lsearch -index 1 [info loaded child] Pkgua] < 0} {
- load [file join $testDir pkgua$ext] pkgua child
+ load [file join $testDir pkgua$ext] Pkgua child
}
} -constraints [list $dll $loaded] -body {
list [child eval {list $pkgua_loaded $pkgua_detached $pkgua_unloaded}] \
@@ -189,7 +189,7 @@ test unload-3.7 {basic unloading of re-loaded package from a safe interpreter, w
}
} -constraints [list $dll $loaded] -body {
list [child eval {list $pkgua_loaded $pkgua_detached $pkgua_unloaded}] \
- [unload [file join $testDir pkgua$ext] pKgUa child] \
+ [unload [file join $testDir pkgua$ext] Pkgua child] \
[child eval info commands pkgua_*] \
[child eval {list $pkgua_loaded $pkgua_detached $pkgua_unloaded}]
} -result {{.. . .} {} {} {.. .. ..}}
@@ -224,7 +224,7 @@ test unload-4.2 {basic loading of unloadable package in a safe interpreter, with
incr load(C)
} -constraints [list $dll $loaded] -body {
list [child eval {list $pkgua_loaded $pkgua_detached $pkgua_unloaded}] \
- [load [file join $testDir pkgua$ext] pKgUA child] \
+ [load [file join $testDir pkgua$ext] Pkgua child] \
[child eval pkgua_eq abc def] \
[lsort [child eval info commands pkgua_*]] \
[child eval {list $pkgua_loaded $pkgua_detached $pkgua_unloaded}]
@@ -234,7 +234,7 @@ test unload-4.3 {basic loading of unloadable package in a second trusted interpr
incr load(T)
} -constraints [list $dll $loaded] -body {
list [child-trusted eval {list $pkgua_loaded $pkgua_detached $pkgua_unloaded}] \
- [load [file join $testDir pkgua$ext] pkguA child-trusted] \
+ [load [file join $testDir pkgua$ext] Pkgua child-trusted] \
[child-trusted eval pkgua_eq abc def] \
[lsort [child-trusted eval info commands pkgua_*]] \
[child-trusted eval {list $pkgua_loaded $pkgua_detached $pkgua_unloaded}]
@@ -291,7 +291,7 @@ test unload-5.1 {unload a module loaded from vfs} \
set dir [pwd]
cd $testDir
testsimplefilesystem 1
- load simplefs:/pkgua$ext pkgua
+ load simplefs:/pkgua$ext Pkgua
} \
-body {
list [catch {unload simplefs:/pkgua$ext} msg] $msg
diff --git a/unix/dltest/pkga.c b/unix/dltest/pkga.c
index 77526b7..ff8f000 100644
--- a/unix/dltest/pkga.c
+++ b/unix/dltest/pkga.c
@@ -129,7 +129,7 @@ Pkga_Init(
if (Tcl_InitStubs(interp, "8.5", 0) == NULL) {
return TCL_ERROR;
}
- code = Tcl_PkgProvide(interp, "Pkga", "1.0");
+ code = Tcl_PkgProvide(interp, "pkga", "1.0");
if (code != TCL_OK) {
return code;
}
diff --git a/unix/dltest/pkgb.c b/unix/dltest/pkgb.c
index 5618871..29f4a23 100644
--- a/unix/dltest/pkgb.c
+++ b/unix/dltest/pkgb.c
@@ -149,10 +149,10 @@ Pkgb_Init(
{
int code;
- if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) {
+ 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/pkgc.c b/unix/dltest/pkgc.c
index 59083a8..23bb2e5 100644
--- a/unix/dltest/pkgc.c
+++ b/unix/dltest/pkgc.c
@@ -121,7 +121,7 @@ Pkgc_Init(
if (Tcl_InitStubs(interp, "8.5", 0) == NULL) {
return TCL_ERROR;
}
- code = Tcl_PkgProvide(interp, "Pkgc", "1.7.2");
+ code = Tcl_PkgProvide(interp, "pkgc", "1.7.2");
if (code != TCL_OK) {
return code;
}
@@ -158,7 +158,7 @@ Pkgc_SafeInit(
if (Tcl_InitStubs(interp, "8.5", 0) == NULL) {
return TCL_ERROR;
}
- code = Tcl_PkgProvide(interp, "Pkgc", "1.7.2");
+ code = Tcl_PkgProvide(interp, "pkgc", "1.7.2");
if (code != TCL_OK) {
return code;
}
diff --git a/unix/dltest/pkgd.c b/unix/dltest/pkgd.c
index ae96971..d51dd6a 100644
--- a/unix/dltest/pkgd.c
+++ b/unix/dltest/pkgd.c
@@ -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;
}
diff --git a/unix/dltest/pkgooa.c b/unix/dltest/pkgooa.c
index b2b4495..8dea0aa 100644
--- a/unix/dltest/pkgooa.c
+++ b/unix/dltest/pkgooa.c
@@ -141,7 +141,7 @@ Pkgooa_Init(
tclOOStubsPtr = &stubsCopy;
- code = Tcl_PkgProvide(interp, "Pkgooa", "1.0");
+ code = Tcl_PkgProvide(interp, "pkgooa", "1.0");
if (code != TCL_OK) {
return code;
}
diff --git a/unix/dltest/pkgua.c b/unix/dltest/pkgua.c
index 07556d1..ad2b2b3 100644
--- a/unix/dltest/pkgua.c
+++ b/unix/dltest/pkgua.c
@@ -227,7 +227,7 @@ Pkgua_Init(
PkguaInitTokensHashTable();
- code = Tcl_PkgProvide(interp, "Pkgua", "1.0");
+ code = Tcl_PkgProvide(interp, "pkgua", "1.0");
if (code != TCL_OK) {
return code;
}