diff options
author | nijtmans <nijtmans> | 2009-11-19 21:17:36 (GMT) |
---|---|---|
committer | nijtmans <nijtmans> | 2009-11-19 21:17:36 (GMT) |
commit | 1aaac758c94c12834f8bf77eadc30e212bc186f4 (patch) | |
tree | 17c64145a2321c7f3db5dff18b0042d1a861aa75 | |
parent | 9d243a7d2ffa0988a6dc1316cecf69e776b75bae (diff) | |
download | tcl-1aaac758c94c12834f8bf77eadc30e212bc186f4.zip tcl-1aaac758c94c12834f8bf77eadc30e212bc186f4.tar.gz tcl-1aaac758c94c12834f8bf77eadc30e212bc186f4.tar.bz2 |
Test-case for fixed [Bug 2849797]
Fix safe-10.1 and safe-10.4 test cases,
making the wrong assumption that Tcltest
should be a static package.
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | generic/tclTest.c | 4 | ||||
-rw-r--r-- | generic/tclTestObj.c | 3 | ||||
-rw-r--r-- | tests/chanio.test | 10 | ||||
-rw-r--r-- | tests/safe.test | 15 |
5 files changed, 26 insertions, 18 deletions
@@ -1,3 +1,12 @@ +2009-11-19 Jan Nijtmans <nijtmans@users.sf.net> + + * generic/tclTest.c Remove extraneus prototypes, follow-up + * generic/tclTestObj.c to [Bug 2883850] + * tests/chanio.test Test-case for fixed [Bug 2849797] + * tests/safe.test Fix safe-10.1 and safe-10.4 test cases, + making the wrong assumption that Tcltest + is a static package. + 2009-11-19 Don Porter <dgp@users.sourceforge.net> * unix/tclAppInit.c: Repair broken build of the tcltest executable. @@ -27,10 +36,11 @@ * win/Makefile.in * win/tcl.m4 * win/configure (regenerated) + * win/tclAppInit.c * win/tclWinDde.c Always compile with Stubs. * win/tclWinReg.c * win/tclWinTest.c - + 2009-11-18 Jan Nijtmans <nijtmans@users.sf.net> * doc/CrtChannel.3 Fix [Bug 2849797]: channel name inconsistencies diff --git a/generic/tclTest.c b/generic/tclTest.c index ca0d507..4e739db 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -14,13 +14,12 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.139 2009/11/18 23:46:05 nijtmans Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.140 2009/11/19 21:17:36 nijtmans Exp $ */ #ifndef USE_TCL_STUBS # define USE_TCL_STUBS #endif -#define TCL_TEST #include "tclInt.h" /* @@ -153,7 +152,6 @@ static TestChannel *firstDetached; * Forward declarations for procedures defined later in this file: */ -int Tcltest_Init(Tcl_Interp *interp); static int AsyncHandlerProc(ClientData clientData, Tcl_Interp *interp, int code); #ifdef TCL_THREADS diff --git a/generic/tclTestObj.c b/generic/tclTestObj.c index 43a64cd..ec7b83b 100644 --- a/generic/tclTestObj.c +++ b/generic/tclTestObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTestObj.c,v 1.35 2009/11/18 23:46:05 nijtmans Exp $ + * RCS: @(#) $Id: tclTestObj.c,v 1.36 2009/11/19 21:17:36 nijtmans Exp $ */ #ifndef USE_TCL_STUBS @@ -39,7 +39,6 @@ static int CheckIfVarUnset(Tcl_Interp *interp, int varIndex); static int GetVariableIndex(Tcl_Interp *interp, const char *string, int *indexPtr); static void SetVarToObj(int varIndex, Tcl_Obj *objPtr); -int TclObjTest_Init(Tcl_Interp *interp); static int TestbignumobjCmd(ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); static int TestbooleanobjCmd(ClientData dummy, diff --git a/tests/chanio.test b/tests/chanio.test index df78461..729b436 100644 --- a/tests/chanio.test +++ b/tests/chanio.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: chanio.test,v 1.21 2008/12/19 16:01:42 dgp Exp $ +# RCS: @(#) $Id: chanio.test,v 1.22 2009/11/19 21:17:36 nijtmans Exp $ if {[catch {package require tcltest 2}]} { chan puts stderr "Skipping tests in [info script]. tcltest 2 required." @@ -1571,8 +1571,8 @@ test chan-io-14.3 {Tcl_SetStdChannel & Tcl_GetStdChannel} {exec openpipe} { out } {err }} -# This test relies on the fact that the smallest available fd is used first. -test chan-io-14.4 {Tcl_SetStdChannel & Tcl_GetStdChannel} {exec unix} { +# This test relies on the fact that stdout is used before stderr. +test chan-io-14.4 {Tcl_SetStdChannel & Tcl_GetStdChannel} {exec} { set f [open $path(test1) w] chan puts -nonewline $f { chan close stdin chan close stdout @@ -1597,8 +1597,8 @@ test chan-io-14.4 {Tcl_SetStdChannel & Tcl_GetStdChannel} {exec unix} { chan close $f2 set result } {{ chan close stdin -file1 -} {file2 +stdout +} {stderr }} catch {interp delete z} test chan-io-14.5 {Tcl_GetChannel: stdio name translation} -setup { diff --git a/tests/safe.test b/tests/safe.test index 22ef475..786cafb 100644 --- a/tests/safe.test +++ b/tests/safe.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: safe.test,v 1.26 2009/11/05 20:15:36 andreas_kupries Exp $ +# RCS: @(#) $Id: safe.test,v 1.27 2009/11/19 21:17:36 nijtmans Exp $ package require Tcl 8.5 @@ -376,34 +376,35 @@ if {[catch {package require Tcltest} msg]} { # we use the Tcltest package , which has no Safe_Init } +teststaticpkg Safepkg1 0 0 test safe-10.1 {testing statics loading} TcltestPackage { set i [safe::interpCreate] list \ - [catch {interp eval $i {load {} Tcltest}} msg] \ + [catch {interp eval $i {load {} Safepkg1}} msg] \ $msg \ [safe::interpDelete $i]; -} {1 {can't use package in a safe interpreter: no Tcltest_SafeInit procedure} {}} +} {1 {can't use package in a safe interpreter: no Safepkg1_SafeInit procedure} {}} test safe-10.2 {testing statics loading / -nostatics} TcltestPackage { set i [safe::interpCreate -nostatics] list \ - [catch {interp eval $i {load {} Tcltest}} msg] \ + [catch {interp eval $i {load {} Safepkg1}} msg] \ $msg \ [safe::interpDelete $i]; } {1 {permission denied (static package)} {}} test safe-10.3 {testing nested statics loading / no nested by default} TcltestPackage { set i [safe::interpCreate] list \ - [catch {interp eval $i {interp create x; load {} Tcltest x}} msg] \ + [catch {interp eval $i {interp create x; load {} Safepkg1 x}} msg] \ $msg \ [safe::interpDelete $i]; } {1 {permission denied (nested load)} {}} test safe-10.4 {testing nested statics loading / -nestedloadok} TcltestPackage { set i [safe::interpCreate -nestedloadok] list \ - [catch {interp eval $i {interp create x; load {} Tcltest x}} msg] \ + [catch {interp eval $i {interp create x; load {} Safepkg1 x}} msg] \ $msg \ [safe::interpDelete $i]; -} {1 {can't use package in a safe interpreter: no Tcltest_SafeInit procedure} {}} +} {1 {can't use package in a safe interpreter: no Safepkg1_SafeInit procedure} {}} test safe-11.1 {testing safe encoding} { set i [safe::interpCreate] |