diff options
-rw-r--r-- | ChangeLog | 207 | ||||
-rw-r--r-- | compat/strftime.c | 6 | ||||
-rw-r--r-- | compat/strtod.c | 3 | ||||
-rw-r--r-- | generic/tcl.h | 23 | ||||
-rw-r--r-- | generic/tclInt.decls | 13 | ||||
-rw-r--r-- | mac/MW_TclAppleScriptHeader.pch | 13 | ||||
-rw-r--r-- | mac/MW_TclHeader.pch | 20 | ||||
-rwxr-xr-x | mac/MW_TclTestHeader.pch | 26 | ||||
-rw-r--r-- | tests/all.tcl | 6 | ||||
-rw-r--r-- | tests/appendComp.test | 3 | ||||
-rw-r--r-- | tests/cmdAH.test | 4 | ||||
-rw-r--r-- | tests/cmdMZ.test | 4 | ||||
-rw-r--r-- | tests/compile.test | 4 | ||||
-rw-r--r-- | tests/exec.test | 6 | ||||
-rw-r--r-- | tests/fileName.test | 10 | ||||
-rw-r--r-- | tests/lset.test | 2 | ||||
-rw-r--r-- | tests/macFCmd.test | 12 | ||||
-rw-r--r-- | tests/namespace.test | 4 |
18 files changed, 284 insertions, 82 deletions
@@ -1,3 +1,210 @@ +2001-11-23 Daniel Steffen <das@users.sourceforge.net> + + ** upport to 8.4 of mac code changes for 8.3.3 & various new + ** changes for 8.4, some already backported to 8.3.4 (patch #435658) + + * generic/tclObj.c: added #include to fix missing prototype errors + + * generic/tcl.h: MAC_TCL: addition of ConditionalMacros.h and use of + DLLIMPORT and DLLEXPORT like on other platforms. ( => no longer need + the .exp files and can remove use of #pragma export that never worked + well) + removed line continuation in #if clause as this breaks the mac + resource compiler (note that *.r files include tcl.h) + + * mac/tclMacFile.c: fixed bug in permission checking code + + * mac/tclMacLoad.c: corrected utf8 handling, comparison of + package names to code fragment names changed to only match on the + length of package name, this allows for fragment names with version + numbers appended + + * mac/tclMacInt.h: + * generic/tclInt.h: + * mac/tclMacTime.c: + * generic/tclIOUtil.c: moved declaration of TclpGetGMTOffset() + + * mac/tclMacShLib.exp: + * mac/tclMacOSA.exp: + * mac/tclMacMSLPrefix.h: removed files + + * unix/Makefile.in: removed reference to .exp files + + * mac/MW_TclBuildLibHeader.h: + * mac/MW_TclBuildLibHeader.pch: + * mac/MW_TclHeaderCommon.h: + * mac/MW_TclStaticHeader.h: + * mac/MW_TclStaticHeader.pch: new precompiled header files + + * mac/MW_TclAppleScriptHeader.pch: + * mac/MW_TclHeader.pch: + * mac/MW_TclTestHeader.pch: + * mac/tclMacCommonPch.h: revised precompiled header handling: now + include a common header file 'MW_TclHeaderCommon.h' from all .pch + files, the .pch files themselves now only setup #defines (e.g. + BUILD_tcl, STATIC_BUILD, TCL_DEBUG, TCL_THREADS) like in makefiles on + other platforms. + + * mac/tclMac.h: + * mac/tclMacPort.h: + * mac/tclMacInt.h: use of BUILD_tcl and TCL_STORAGE_CLASS like on other + platforms, standardize #include'd files to what's done on other + platforms, removed use of #pragma export. + + * mac/tcltkMacBuildSupport.sea.hqx: new archive of mac build support + files & suggested build environment directory hierarchy: + - 'Building MacTclTk' & 'CW Pro6 changes' readme's. + - projects for MoreFiles 1.5.2 static & shared libraries. + - project & sources for 'pseudoCarbonSupport', see below. + - included XML versions of the projects for CW Pro5 or Pro7 users. + + * mac/tclMacProjects.sea.hqx: updated mac build project files: + - build support for CodeWarrior Pro6, UnivIntf 3.4 & shared runtime + libraries: the MSL libraries and MoreFiles are no longer compiled into + Tcl.shlb, all non-static binaries now use the Pro6 shared runtime + libraries and MoreFiles.shlb. These shlbs are merged into the standard + Wish and TclShell, but 3rd party applications linking with Tcl.shlb or + Tk.shlb need to setup access to them. (see the "(sh-ppc)" targets + for how to do this.) + - included XML versions of the projects for CW Pro5 or Pro7 users. + - use compat/strtod.c instead of MSL's strtod() + - use WASTE versions of MSL for tcl test target to avoid text buffer + cutoff at 32k. + - Merging the full MSL.shlb and the other shlbs into Wish & TclShell + makes them a bit larger than before, use unmerged binaries to avoid + copying the shared code with every application, e.g. when deploying + numerous Wish based droplets. + - Note that using CW Pro5 to compile extensions is in principle still + possible, but need to link with Pro6 runtime libraries. + - Tclapplescript now loads and runs on CFM68k. + - Highly experimental "pseudoCarbon" support for Tcl only on OS 8/9: + binaries in "Build:(Carbon):" link against CarbonLib instead of + InterfaceLib, however the actual code has not been carbonized! i.e. it + will not run on OSX and may not even run properly with CarbonLib. + This should in principle allow you to build & test OS9 CFM Carbon + binaries that need to link with Tcl.shlb. On OSX you can use the + native Tcl.framework, but you have to build a MachO binary as there + is no CFM glue lib for Tcl.framework. + the library pseudoCarbonSupport.shlb manually loads the symbols + from InterfaceLib that are not in CarbonLib but are needed by the + uncarbonized code in Tcl.shlb and TclShell. + + * generic/tclMain.c: MAC_TCL: workaround for broken/non-standard isatty + on MW Pro6, #include <unistd.h> instead of defining isatty + + * mac/tclMacPort.h: MW Pro6 changes for MSL fcntl.h, stat.h & isatty + + * mac/tclMacAppInit.c: add EXTERN to InstallConsole to enable DLL + export via the TCL_STORAGE_CLASS mechanism. + + * mac/tclMacFCmd.c: fix for FSpDirectoryCopy API change + + * mac/tclMacLibrary.c: emit compile time error when + TCL_REGISTER_LIBRARY and USE_TCL_STUBS are both defined at the same + time in an extension, this use is not currently supported and will + result in a crash when dynamically loading the extension. + + * mac/tclMacApplication.r: + * mac/tclMacLibrary.r: + * mac/tclMacOSA.r: + * mac/tclMacResource.r: fixed obsolete copyrights/dates in version + strings; updated version strings to standard usage; added support for + '(Support Libraries)' subfolder for shared runtime libraries in + unmerged binaries; commented out demo setting of "Tcl Environment + Variables"; reorganized resources among these files to avoid + multiple copies in applications and shared libraries, the script + libraries are now no longer duplicated in Tclsh but are only included + in the resources of Tcl.shlb. + + * mac/tclMacChan.c: + * mac/tclMacSock.c: cast for *BlockMode + + * mac/tclMacUtil.c: + * mac/tclMacMath.h: removed obsolete hypot() definition + + * generic/tclIntPlatDecls.h: + * generic/tclInt.decls: + * generic/tclStubInit.c: + * mac/tclMacNotify.c: + * mac/tclMacOSA.c: + * mac/tclMacUtil.c: + * generic/tclThreadTest.c: renamed routines conflicting with standard + Apple or MoreFiles headers (at compile or link time): + GetGlobalMouse -> GetGlobalMouseTcl + FSpGetDirectoryID -> FSpGetDirectoryIDTcl + FSpOpenResFileCompat -> FSpOpenResFileCompatTcl + FSpCreateResFileCompat -> FSpCreateResFileCompatTcl + NewThread -> NewTestThread + the renamed MoreFiles *Tcl routines are just wrappers calling into the + MoreFiles DLL. + + * mac/tclMacCommonPch.h: + * mac/tclMacThrd.c: + * mac/tclMacPanic.c: removed OLDROUTINENAMES define, renamed obsolete + apple API names to modern equivalents; UH3.4 support: added #include + <ControlDefinitions.h>, updated New*Proc() calls to New*UPP(). + + * mac/tclMacUnix.c: added missing (Tcl_Obj ***) cast to + Tcl_ListObjGetElements call + + * mac/tclMacAlloc.c: modernized TclpSysAlloc() to use temporary + memory instead of system heap memory when available (MacOS + >= 7.5 and possibly earlier, use of system heap has been + discouraged for a long time and has many disadvantages, e.g. memory + isn't paged out, and errors can very easily bring the system down); + fixed crashing bug in TclpSysRealloc() and CleanUpExitProc() where + memory was being accessed after having been deallocated; fixed + memory leak in (de)allocation code (for every block ever allocated + with TclpSysAlloc, a Ptr was leaked), if temporary memory is + available, don't track allocated memory, instead use + RecoverHandle() to get Handle from Ptr, otherwise use doubly linked + list to correctly track memory and free all allocated memory; added + new option for ConfigureMemory: MEMORY_DONT_USE_TEMPMEM, disables + use of temporary memory even when it would be available, only + necessary when writing e.g. a driver (using tcl??); increased + fraction of application heap reserved for OS routines to 512K + + * compat/strftime.c: + * mac/tclMacTime.c: + * mac/tclMacPort.h: + * generic/tclInt.decls: + * generic/tclIntPlatDecls.h: + * generic/tclStubInit.c: timezone support for mac via + TclpGetTZName() like on windows, using an inverse timezone table + adapted from tclDate.c to map gmtoffset in seconds gotten from + the MacOS APIs to a timezone string, as there is no good way to get + this info from MacOS. I had to make up some unusual timezones and + arbitrarily decide on the most standard of the multiple choices + available for every timezone. + + * generic/tclExecute.c: workaround for a MSL bug/misfeature: for + very small floats, MSL can return errno ERANGE but a + non-zero value ( < LDBL_MIN however) + + * mac/tclMacAppInit.c: support for WASTE text library using + temporary memory, setting has no effect if WASTE is not used. + + * mac/tclMacPanic.c: removed duplicate code from generic/tclPanic.c + and added that file to projects instead. + + * tests/all.tcl: set tcltest::singleProcess 1 as multiple processes + are not available on the mac. + + * tests/cmdAH.test: access time not available on the mac, skip the + atime touch test + + * tests/appendComp.test: + * tests/cmdMZ.test: + * tests/compile.test: + * tests/exec.test: + * tests/fileName.test: + * tests/lset.test: + * tests/namespace.test: + * tests/tcltest.test: added missing cleanups/tests/catches that + caused tests to fail on the mac. + + * doc/tclvars.n: doc bug, env(PWD) should be env(HOME) [Bug 463834] + 2001-11-21 Don Porter <dgp@users.sourceforge.net> * tests/trace.test (trace-8.8): Corrected test for Bug 219393. diff --git a/compat/strftime.c b/compat/strftime.c index 2203536..a2199a5 100644 --- a/compat/strftime.c +++ b/compat/strftime.c @@ -8,7 +8,7 @@ * source. See the copyright notice below for details on redistribution * restrictions. The "license.terms" file does not apply to this file. * - * RCS: @(#) $Id: strftime.c,v 1.7 2000/01/15 01:50:43 hobbs Exp $ + * RCS: @(#) $Id: strftime.c,v 1.8 2001/11/23 01:26:30 das Exp $ */ /* @@ -45,7 +45,7 @@ */ #if defined(LIBC_SCCS) -static char *rcsid = "$Id: strftime.c,v 1.7 2000/01/15 01:50:43 hobbs Exp $"; +static char *rcsid = "$Id: strftime.c,v 1.8 2001/11/23 01:26:30 das Exp $"; #endif /* LIBC_SCCS */ #include <time.h> @@ -324,7 +324,6 @@ _fmt(format, t) if (!_conv((t->tm_year + TM_YEAR_BASE), 4, '0')) return(0); continue; -#ifndef MAC_TCL case 'Z': { char *name = TclpGetTZName(t->tm_isdst); if (name && !_add(name)) { @@ -332,7 +331,6 @@ _fmt(format, t) } continue; } -#endif case '%': /* * X311J/88-090 (4.12.3.5): if conversion char is diff --git a/compat/strtod.c b/compat/strtod.c index 22d8d92..ad5b72e 100644 --- a/compat/strtod.c +++ b/compat/strtod.c @@ -9,10 +9,11 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: strtod.c,v 1.3 2001/09/04 23:16:18 dgp Exp $ + * RCS: @(#) $Id: strtod.c,v 1.4 2001/11/23 01:26:34 das Exp $ */ #include "tcl.h" +#include "tclPort.h" #ifdef NO_STDLIB_H # include "../compat/stdlib.h" #else diff --git a/generic/tcl.h b/generic/tcl.h index f960f51..c7cb5f2 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.105 2001/11/19 14:35:54 dkf Exp $ + * RCS: @(#) $Id: tcl.h,v 1.106 2001/11/23 01:26:39 das Exp $ */ #ifndef _TCL @@ -71,8 +71,7 @@ extern "C" { */ #ifndef __WIN32__ -# if defined(_WIN32) || defined(WIN32) || \ - defined(__CYGWIN__) || defined(__MINGW32__) || defined(__BORLANDC__) +# if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__BORLANDC__) # define __WIN32__ # ifndef WIN32 # define WIN32 @@ -102,6 +101,7 @@ extern "C" { */ #ifdef MAC_TCL +#include <ConditionalMacros.h> # ifndef HAS_STDARG # define HAS_STDARG 1 # endif @@ -222,7 +222,7 @@ extern "C" { # define DLLIMPORT # define DLLEXPORT #else -# if defined(__WIN32__) && (defined(_MSC_VER) || (__BORLANDC__ >= 0x0550) || (defined(__GNUC__) && defined(__declspec))) +# if (defined(__WIN32__) && (defined(_MSC_VER) || (__BORLANDC__ >= 0x0550) || (defined(__GNUC__) && defined(__declspec)))) || (defined(MAC_TCL) && FUNCTION_DECLSPEC) # define DLLIMPORT __declspec(dllimport) # define DLLEXPORT __declspec(dllexport) # else @@ -244,7 +244,7 @@ extern "C" { * name of a library we are building, is set on the compile line for sources * that are to be placed in the library. When this macro is set, the * storage class will be set to DLLEXPORT. At the end of the header file, the - * storage class will be reset to DLLIMPORt. + * storage class will be reset to DLLIMPORT. */ #undef TCL_STORAGE_CLASS @@ -2149,7 +2149,20 @@ EXTERN CONST char * Tcl_InitStubs _ANSI_ARGS_((Tcl_Interp *interp, * accessible via the stubs table. */ +/* + * tclPlatDecls.h can't be included here on the Mac, as we need + * Mac specific headers to define the Mac types used in this file, + * but these Mac haders conflict with a number of tk types + * and thus can't be included in the globally read tcl.h + * This header was originally added here as a fix for bug 5241 + * (stub link error for symbols in TclPlatStubs table), as a work- + * around for the bug on the mac, tclMac.h is included immediately + * after tcl.h in the tcl precompiled header (with DLLEXPORT set). + */ + +#if !defined(MAC_TCL) #include "tclPlatDecls.h" +#endif /* * Public functions that are not accessible via the stubs table. diff --git a/generic/tclInt.decls b/generic/tclInt.decls index 5ae28d9..23dfdd0 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tclInt.decls,v 1.37 2001/11/21 02:36:20 hobbs Exp $ +# RCS: @(#) $Id: tclInt.decls,v 1.38 2001/11/23 01:26:47 das Exp $ library tcl @@ -696,7 +696,7 @@ declare 6 mac { Boolean createFolder, FSSpec *spec) } declare 7 mac { - void GetGlobalMouse(Point *mouse) + void GetGlobalMouseTcl(Point *mouse) } # The following routines are utility functions in Tcl. They are exported @@ -704,15 +704,15 @@ declare 7 mac { # however. The first set are from the MoreFiles package. declare 8 mac { - pascal OSErr FSpGetDirectoryID(CONST FSSpec *spec, long *theDirID, \ + pascal OSErr FSpGetDirectoryIDTcl(CONST FSSpec *spec, long *theDirID, \ Boolean *isDirectory) } declare 9 mac { - pascal short FSpOpenResFileCompat(CONST FSSpec *spec, \ + pascal short FSpOpenResFileCompatTcl(CONST FSSpec *spec, \ SignedByte permission) } declare 10 mac { - pascal void FSpCreateResFileCompat(CONST FSSpec *spec, OSType creator, \ + pascal void FSpCreateResFileCompatTcl(CONST FSSpec *spec, OSType creator, \ OSType fileType, ScriptCode scriptTag) } @@ -767,6 +767,9 @@ declare 23 mac { # declare 24 mac { # int TclMacReadlink(char *path, char *buf, int size) # } +declare 24 mac { + char * TclpGetTZName(int isdst) +} declare 25 mac { int TclMacChmod(char *path, int mode) } diff --git a/mac/MW_TclAppleScriptHeader.pch b/mac/MW_TclAppleScriptHeader.pch index 84b09fc..12fec3f 100644 --- a/mac/MW_TclAppleScriptHeader.pch +++ b/mac/MW_TclAppleScriptHeader.pch @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: MW_TclAppleScriptHeader.pch,v 1.4 1999/05/11 07:11:46 jingham Exp $ + * RCS: @(#) $Id: MW_TclAppleScriptHeader.pch,v 1.5 2001/11/23 01:26:17 das Exp $ */ /* @@ -33,15 +33,4 @@ #include "tclMacCommonPch.h" -/* #define TCL_REGISTER_LIBRARY 1 */ #define USE_TCL_STUBS - -/* - * Place any includes below that will are needed by the majority of the - * and is OK to be in any file in the system. The pragma's are used - * to control what functions are exported in the Tcl shared library. - */ - -#pragma export on -#pragma export off - diff --git a/mac/MW_TclHeader.pch b/mac/MW_TclHeader.pch index 5253291..14bf41a 100644 --- a/mac/MW_TclHeader.pch +++ b/mac/MW_TclHeader.pch @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: MW_TclHeader.pch,v 1.7 1999/05/11 07:11:48 jingham Exp $ + * RCS: @(#) $Id: MW_TclHeader.pch,v 1.8 2001/11/23 01:26:20 das Exp $ */ /* @@ -30,20 +30,4 @@ #pragma precompile_target "MW_TclHeader68K" #endif -#include "tclMacCommonPch.h" - -/* - * Place any includes below that will are needed by the majority of the - * and is OK to be in any file in the system. The pragma's are used - * to control what functions are exported in the Tcl shared library. - */ - -#pragma export on -#include "tcl.h" -#include "tclMac.h" -#include "tclInt.h" -#include "MoreFiles.h" -#include "MoreFilesExtras.h" - -#pragma export reset - +#include "MW_TclHeaderCommon.h" diff --git a/mac/MW_TclTestHeader.pch b/mac/MW_TclTestHeader.pch index ba588bb..dbb297a 100755 --- a/mac/MW_TclTestHeader.pch +++ b/mac/MW_TclTestHeader.pch @@ -1,5 +1,5 @@ /* - * MW_TclHeader.pch -- + * MW_TclTestHeader.pch -- * * This file is the source for a pre-compilied header that gets used * for all files in the Tcl projects. This make compilies go a bit @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: MW_TclTestHeader.pch,v 1.1 2000/02/10 08:39:11 jingham Exp $ + * RCS: @(#) $Id: MW_TclTestHeader.pch,v 1.2 2001/11/23 01:26:23 das Exp $ */ /* @@ -30,24 +30,12 @@ #pragma precompile_target "MW_TclTestHeader68K" #endif -#define TCL_DEBUG 1 - -/*#define TCL_THREADS 1*/ - -#include "tclMacCommonPch.h" +#define BUILD_tcl 1 -/* - * Place any includes below that will are needed by the majority of the - * and is OK to be in any file in the system. The pragma's are used - * to control what functions are exported in the Tcl shared library. - */ +#define STATIC_BUILD 1 -#pragma export on -#include "tcl.h" -#include "tclMac.h" -#include "tclInt.h" -#include "MoreFiles.h" -#include "MoreFilesExtras.h" +#define TCL_DEBUG 1 -#pragma export reset +#define TCL_THREADS 1 +#include "MW_TclHeaderCommon.h" diff --git a/tests/all.tcl b/tests/all.tcl index d8dbd25..4c407fb 100644 --- a/tests/all.tcl +++ b/tests/all.tcl @@ -8,11 +8,15 @@ # Copyright (c) 2000 by Ajuba Solutions # All rights reserved. # -# RCS: @(#) $Id: all.tcl,v 1.14 2001/09/11 18:03:05 andreas_kupries Exp $ +# RCS: @(#) $Id: all.tcl,v 1.15 2001/11/23 01:25:35 das Exp $ set tcltestVersion [package require tcltest] namespace import -force tcltest::* +if {$tcl_platform(platform) == "macintosh"} { + tcltest::singleProcess 1 +} + tcltest::testsDirectory [file dir [info script]] tcltest::runAllTests diff --git a/tests/appendComp.test b/tests/appendComp.test index 207a14b..e5c96f8 100644 --- a/tests/appendComp.test +++ b/tests/appendComp.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: appendComp.test,v 1.4 2001/09/12 20:28:50 dgp Exp $ +# RCS: @(#) $Id: appendComp.test,v 1.5 2001/11/23 01:25:38 das Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -355,6 +355,7 @@ catch {unset i x result y} catch {rename foo ""} catch {rename bar ""} catch {rename check ""} +catch {rename bar {}} # cleanup ::tcltest::cleanupTests diff --git a/tests/cmdAH.test b/tests/cmdAH.test index 88272d2..0ebbe48 100644 --- a/tests/cmdAH.test +++ b/tests/cmdAH.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: cmdAH.test,v 1.15 2001/09/09 17:32:16 mdejong Exp $ +# RCS: @(#) $Id: cmdAH.test,v 1.16 2001/11/23 01:25:51 das Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -1178,7 +1178,7 @@ test cmdAH-20.3 {Tcl_FileObjCmd: atime} { test cmdAH-20.4 {Tcl_FileObjCmd: atime} { list [catch {file atime $file notint} msg] $msg } {1 {expected integer but got "notint"}} -test cmdAH-20.5 {Tcl_FileObjCmd: atime touch} { +test cmdAH-20.5 {Tcl_FileObjCmd: atime touch} {unixOrPc} { if {[string equal $tcl_platform(platform) "windows"]} { set old [pwd] cd $::tcltest::temporaryDirectory diff --git a/tests/cmdMZ.test b/tests/cmdMZ.test index d2aca4d..d2a57f9 100644 --- a/tests/cmdMZ.test +++ b/tests/cmdMZ.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: cmdMZ.test,v 1.8 2001/05/21 22:33:47 hobbs Exp $ +# RCS: @(#) $Id: cmdMZ.test,v 1.9 2001/11/23 01:25:54 das Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -78,7 +78,7 @@ test cmdMZ-3.1 {Tcl_SourceObjCmd: error conditions} {macOnly} { } {1 {wrong # args: should be "source fileName" or "source -rsrc name ?fileName?" or "source -rsrcid id ?fileName?"}} test cmdMZ-3.2 {Tcl_SourceObjCmd: error conditions} {macOnly} { list [catch {source a b} msg] $msg -} {1 {wrong # args: should be "source fileName" or "source -rsrc name ?fileName?" or "source -rsrcid id ?fileName?"}} +} {1 {bad argument: should be "source fileName" or "source -rsrc name ?fileName?" or "source -rsrcid id ?fileName?"}} test cmdMZ-3.3 {Tcl_SourceObjCmd: error conditions} {unixOrPc} { list [catch {source} msg] $msg } {1 {wrong # args: should be "source fileName"}} diff --git a/tests/compile.test b/tests/compile.test index abadee0..5e77875 100644 --- a/tests/compile.test +++ b/tests/compile.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: compile.test,v 1.14 2001/11/19 21:04:42 msofer Exp $ +# RCS: @(#) $Id: compile.test,v 1.15 2001/11/23 01:25:58 das Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -289,7 +289,7 @@ test compile-12.2 {testing error on literal deletion} {memDebug execCommandExist # Special test for underestimating the maxStackSize required for a # compiled command. A failure will cause a segfault in the child # process. -test compile-13.1 {testing underestimate of maxStackSize in list cmd} { +test compile-13.1 {testing underestimate of maxStackSize in list cmd} {execCommandExists} { set body {set x [list} for {set i 0} {$i < 3000} {incr i} { append body " $i" diff --git a/tests/exec.test b/tests/exec.test index af8bf32..9087173 100644 --- a/tests/exec.test +++ b/tests/exec.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: exec.test,v 1.8 2000/04/10 17:18:58 ericm Exp $ +# RCS: @(#) $Id: exec.test,v 1.9 2001/11/23 01:26:02 das Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -228,7 +228,9 @@ test exec-4.5 {redirecting output and stderr to file} {execCommandExists stdio} # I/O redirection: input from file. +if { [set ::tcltest::testConstraints(execCommandExists)] } { exec $::tcltest::tcltest echo "Just a few thoughts" > gorp.file +} test exec-5.1 {redirecting input from file} {execCommandExists stdio} { exec $::tcltest::tcltest cat < gorp.file } {Just a few thoughts} @@ -432,7 +434,9 @@ test exec-11.5 {commands in background} {execCommandExists stdio} { # Make sure that background commands are properly reaped when # they eventually die. +if { [set ::tcltest::testConstraints(execCommandExists)] } { exec $::tcltest::tcltest sleep 3 +} test exec-12.1 {reaping background processes} \ {execCommandExists stdio unixOnly nonPortable} { for {set i 0} {$i < 20} {incr i} { diff --git a/tests/fileName.test b/tests/fileName.test index 757a8d9..b7616f3 100644 --- a/tests/fileName.test +++ b/tests/fileName.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: fileName.test,v 1.15 2001/10/29 15:02:44 vincentdarley Exp $ +# RCS: @(#) $Id: fileName.test,v 1.16 2001/11/23 01:26:06 das Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -304,6 +304,11 @@ test filename-4.18 {Tcl_SplitPath: unix} {testsetplatform} { testsetplatform unix file split foo/bar~/baz } {foo bar~ baz} + +if {[tcltest::testConstraint testsetplatform]} { + testsetplatform $platform +} + test filename-4.19 {Tcl_SplitPath} { set oldDir [pwd] set res [catch { @@ -317,6 +322,7 @@ test filename-4.19 {Tcl_SplitPath} { set idx [string first tildetmp $norm] set norm [string range $norm $idx end] # fix path away so all platforms are the same + regsub {(.*):$} $norm {\1} norm regsub -all ":" $norm "/" norm # make sure we can delete the directory we created cd $oldDir @@ -1717,7 +1723,7 @@ test filename-16.13 {windows specific globbing} {pcOnly sharedCdrive} { } //[info hostname]/c/globTest # cleanup -file delete -force C:/globTest +catch {file delete -force C:/globTest} cd $oldDir file delete -force globTest set env(HOME) $oldhome diff --git a/tests/lset.test b/tests/lset.test index 0e70357..6bf412f 100644 --- a/tests/lset.test +++ b/tests/lset.test @@ -449,6 +449,8 @@ test lset-14.2 {lset, not compiled, flat args, is string rep preserved?} { catch {unset noRead} catch {unset noWrite} catch {rename failTrace {}} +catch {unset ::x} +catch {unset ::y} # cleanup ::tcltest::cleanupTests diff --git a/tests/macFCmd.test b/tests/macFCmd.test index 52182b0..275c466 100644 --- a/tests/macFCmd.test +++ b/tests/macFCmd.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: macFCmd.test,v 1.7 2000/04/10 17:19:02 ericm Exp $ +# RCS: @(#) $Id: macFCmd.test,v 1.8 2001/11/23 01:26:14 das Exp $ # if {[lsearch [namespace children] ::tcltest] == -1} { @@ -32,7 +32,7 @@ file delete -force foo.dir test macFCmd-1.1 {GetFileFinderAttributes - no file} {macOnly} { catch {file delete -force foo.file} list [catch {file attributes foo.file -creator} msg] $msg -} {1 {could not read ":foo.file": no such file or directory}} +} {1 {could not read "foo.file": no such file or directory}} test macFCmd-1.2 {GetFileFinderAttributes - creator} {macOnly} { catch {file delete -force foo.file} catch {close [open foo.file w]} @@ -80,7 +80,7 @@ test macFCmd-1.8 {GetFileFinderAttributes - folder hidden} {macOnly} { test macFCmd-2.1 {GetFileReadOnly - bad file} {macOnly} { catch {file delete -force foo.file} list [catch {file attributes foo.file -readonly} msg] $msg -} {1 {could not read ":foo.file": no such file or directory}} +} {1 {could not read "foo.file": no such file or directory}} test macFCmd-2.2 {GetFileReadOnly - file not read only} {macOnly} { catch {file delete -force foo.file} close [open foo.file w] @@ -111,7 +111,7 @@ test macFCmd-2.5 {GetFileReadOnly - directory read only} {macOnly fileSharing} { test macFCmd-3.1 {SetFileFinderAttributes - bad file} {macOnly} { catch {file delete -force foo.file} list [catch {file attributes foo.file -creator FOOO} msg] $msg -} {1 {could not read ":foo.file": no such file or directory}} +} {1 {could not read "foo.file": no such file or directory}} test macFCmd-3.2 {SetFileFinderAttributes - creator} {macOnly} { catch {file delete -force foo.file} close [open foo.file w] @@ -147,12 +147,12 @@ test macFCmd-3.7 {SetFileFinderAttributes - directory} {macOnly} { file mkdir foo.dir list [catch {file attributes foo.dir -creator FOOO} msg] \ $msg [file delete -force foo.dir] -} {1 {cannot set -creator: ":foo.dir" is a directory} {}} +} {1 {cannot set -creator: "foo.dir" is a directory} {}} test macFCmd-4.1 {SetFileReadOnly - bad file} {macOnly} { catch {file delete -force foo.file} list [catch {file attributes foo.file -readonly 1} msg] $msg -} {1 {could not read ":foo.file": no such file or directory}} +} {1 {could not read "foo.file": no such file or directory}} test macFCmd-4.2 {SetFileReadOnly - file not readonly} {macOnly} { catch {file delete -force foo.file} close [open foo.file w] diff --git a/tests/namespace.test b/tests/namespace.test index 303ec84..76e7425 100644 --- a/tests/namespace.test +++ b/tests/namespace.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: namespace.test,v 1.17 2001/09/12 20:28:50 dgp Exp $ +# RCS: @(#) $Id: namespace.test,v 1.18 2001/11/23 01:26:27 das Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -1137,6 +1137,7 @@ test namespace-40.1 {Ignoring namespace proc "unknown"} { } {global global} test namespace-41.1 {Shadowing byte-compiled commands} { + set res {} namespace eval ns { set res {} proc test {} { @@ -1148,6 +1149,7 @@ test namespace-41.1 {Shadowing byte-compiled commands} { } lappend ::res [test] } + namespace delete ns set res } {0 1} |