summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2015-12-22 09:11:57 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2015-12-22 09:11:57 (GMT)
commit299924e512e6809f22f5fa3e4410fcc706ceec82 (patch)
tree6caf866271558bbf5855f922db128aae1d3c7024
parenta03e74efc1bbec20a5c2488448a8de28d9fb28fb (diff)
downloadtcl-299924e512e6809f22f5fa3e4410fcc706ceec82.zip
tcl-299924e512e6809f22f5fa3e4410fcc706ceec82.tar.gz
tcl-299924e512e6809f22f5fa3e4410fcc706ceec82.tar.bz2
Remove TIP #414 fragment, not strictly needed for the zipfs TIP.
Add more zipfs test-cases
-rw-r--r--generic/tcl.h7
-rw-r--r--generic/tclEncoding.c23
-rw-r--r--tests/zipfs.test73
3 files changed, 64 insertions, 39 deletions
diff --git a/generic/tcl.h b/generic/tcl.h
index fed6b78..a08edde 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -2424,13 +2424,6 @@ const char * TclTomMathInitializeStubs(Tcl_Interp *interp,
* TODO - tommath stubs export goes here!
*/
-/* Tcl_InitSubsystems, see TIP #414 */
-
-#ifndef USE_TCL_STUBS
-EXTERN const char * Tcl_InitSubsystems(TCL_NORETURN1
- Tcl_PanicProc *panicProc);
-#endif
-
/*
* Public functions that are not accessible via the stubs table.
* Tcl_GetMemoryInfo is needed for AOLserver. [Bug 1868171]
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c
index 4020445..4edebcf 100644
--- a/generic/tclEncoding.c
+++ b/generic/tclEncoding.c
@@ -1440,10 +1440,10 @@ Tcl_UtfToExternal(
/*
*---------------------------------------------------------------------------
*
- * Tcl_InitSubsystems/Tcl_FindExecutable --
+ * Tcl_FindExecutable --
*
- * This function initializes everything needed for the Tcl library
- * to be able to operate.
+ * This function computes the absolute path name of the current
+ * application, given its argv[0] value.
*
* Results:
* None.
@@ -1454,23 +1454,6 @@ Tcl_UtfToExternal(
*
*---------------------------------------------------------------------------
*/
-MODULE_SCOPE const TclStubs tclStubs;
-
-static const struct {
- const TclStubs *stubs;
- const char version[16];
-} stubInfo = {
- &tclStubs, TCL_PATCH_LEVEL
-};
-
-const char *
-Tcl_InitSubsystems(TCL_NORETURN1 Tcl_PanicProc *panicProc)
-{
- Tcl_SetPanicProc(panicProc);
- TclInitSubsystems();
- return stubInfo.version;
-}
-
#undef Tcl_FindExecutable
void
Tcl_FindExecutable(
diff --git a/tests/zipfs.test b/tests/zipfs.test
index e8112f5..3f53cf8 100644
--- a/tests/zipfs.test
+++ b/tests/zipfs.test
@@ -15,49 +15,98 @@ if {"::tcltest" ni [namespace children]} {
namespace import -force ::tcltest::*
}
-testConstraint zlib [llength [info commands zlib]]
+testConstraint zipfs [expr {[llength [info commands zlib]] && [regexp tcltest [info nameofexecutable]]}]
-test zipfs-1.1 {zipfs basics} -constraints zlib -body {
+test zipfs-1.1 {zipfs basics} -constraints zipfs -body {
load {} zipfs
+} -result {}
+
+test zipfs-1.2 {zipfs basics} -constraints zipfs -body {
package require zipfs
} -result {1.0}
-test zipfs-1.2 {zipfs basics} -constraints zlib -returnCodes error -body {
+test zipfs-1.3 {zipfs basics} -constraints zipfs -returnCodes error -body {
::zipfs::mount a b c d e f
} -result {wrong # args: should be "::zipfs::mount ?zipfile ?mountpoint? ?password???"}
-test zipfs-1.3 {zipfs basics} -constraints zlib -returnCodes error -body {
+test zipfs-1.4 {zipfs basics} -constraints zipfs -returnCodes error -body {
::zipfs::unmount a b c d e f
} -result {wrong # args: should be "::zipfs::unmount zipfile"}
-test zipfs-1.4 {zipfs basics} -constraints zlib -returnCodes error -body {
+test zipfs-1.5 {zipfs basics} -constraints zipfs -returnCodes error -body {
::zipfs::mkkey a b c d e f
} -result {wrong # args: should be "::zipfs::mkkey password"}
-test zipfs-1.5 {zipfs basics} -constraints zlib -returnCodes error -body {
+test zipfs-1.6 {zipfs basics} -constraints zipfs -returnCodes error -body {
::zipfs::mkimg a b c d e f
} -result {wrong # args: should be "::zipfs::mkimg outfile indir ?strip? ?password? ?infile?"}
-test zipfs-1.6 {zipfs basics} -constraints zlib -returnCodes error -body {
+test zipfs-1.7 {zipfs basics} -constraints zipfs -returnCodes error -body {
::zipfs::mkzip a b c d e f
} -result {wrong # args: should be "::zipfs::mkzip outfile indir ?strip? ?password?"}
-test zipfs-1.7 {zipfs basics} -constraints zlib -returnCodes error -body {
+test zipfs-1.8 {zipfs basics} -constraints zipfs -returnCodes error -body {
::zipfs::exists a b c d e f
} -result {wrong # args: should be "::zipfs::exists filename"}
-test zipfs-1.8 {zipfs basics} -constraints zlib -returnCodes error -body {
+test zipfs-1.9 {zipfs basics} -constraints zipfs -returnCodes error -body {
::zipfs::info a b c d e f
} -result {wrong # args: should be "::zipfs::info filename"}
-test zipfs-1.9 {zipfs basics} -constraints zlib -returnCodes error -body {
+test zipfs-1.10 {zipfs basics} -constraints zipfs -returnCodes error -body {
::zipfs::list a b c d e f
} -result {wrong # args: should be "::zipfs::list ?(-glob|-regexp)? ?pattern?"}
+test zipfs-2.1 {zipfs mkzip empty archive} -constraints zipfs -returnCodes error -body {
+ ::zipfs::mkzip abc.zip $tcl_library/xxxx
+} -result {empty archive}
+
+test zipfs-2.2 {zipfs mkzip} -constraints zipfs -body {
+ set pwd [pwd]
+ cd $tcl_library/encoding
+ ::zipfs::mkzip abc.zip .
+ ::zipfs::mount abc.zip /abc
+ ::zipfs::list -glob /abc/cp850.*
+} -cleanup {
+ cd $pwd
+} -result {/abc/cp850.enc}
+
+test zipfs-2.3 {zipfs unmount} -constraints zipfs -body {
+ ::zipfs::info /abc/cp850.enc
+} -result [list $tcl_library/encoding/abc.zip 1090 527 39434]
+
+test zipfs-2.4 {zipfs unmount} -constraints zipfs -body {
+ set f [open /abc/cp850.enc]
+ read $f
+} -result {# Encoding file: cp850, single-byte
+S
+003F 0 1
+00
+0000000100020003000400050006000700080009000A000B000C000D000E000F
+0010001100120013001400150016001700180019001A001B001C001D001E001F
+0020002100220023002400250026002700280029002A002B002C002D002E002F
+0030003100320033003400350036003700380039003A003B003C003D003E003F
+0040004100420043004400450046004700480049004A004B004C004D004E004F
+0050005100520053005400550056005700580059005A005B005C005D005E005F
+0060006100620063006400650066006700680069006A006B006C006D006E006F
+0070007100720073007400750076007700780079007A007B007C007D007E007F
+00C700FC00E900E200E400E000E500E700EA00EB00E800EF00EE00EC00C400C5
+00C900E600C600F400F600F200FB00F900FF00D600DC00F800A300D800D70192
+00E100ED00F300FA00F100D100AA00BA00BF00AE00AC00BD00BC00A100AB00BB
+2591259225932502252400C100C200C000A9256325512557255D00A200A52510
+25142534252C251C2500253C00E300C3255A25542569256625602550256C00A4
+00F000D000CA00CB00C8013100CD00CE00CF2518250C2588258400A600CC2580
+00D300DF00D400D200F500D500B500FE00DE00DA00DB00D900FD00DD00AF00B4
+00AD00B1201700BE00B600A700F700B800B000A800B700B900B300B225A000A0
+}
-
-
+test zipfs-2.5 {zipfs exists} -constraints zipfs -body {
+ ::zipfs::unmount abc.zip
+ ::zipfs::exists /abc/cp850.enc
+} -cleanup {
+ file delete abc.zip
+} -result 1
::tcltest::cleanupTests
return