summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* * tests/subst.test: added tests for non-zero return code handlinghobbs2000-11-011-14/+66
| | | | | | by subst. * generic/tclParse.c (Tcl_EvalEx): corrected handling of non-zero, non-error return code cases for subst. [BUG: 119829]
* tests/clock.test: corrected clock-2.* test numberinghobbs2000-10-311-3/+3
|
* * tests/all.tcl: Removed support for tcltest 1.0.jenn2000-10-243-1475/+1028
| | | | | | | | | | * tests/tcltest.test: * library/tcltest1.0/tcltest.tcl: * library/tcltest1.0/pkgIndex.tcl: * docs/tcltest.n: Moved tcltest2 code so that it's the standard version of tcltest. Removed all tcltest2 files (tests/tcltest2.test, library/tcltest1.0/tcltest2.tcl, docs/tcltest2.n).
* * library/tcltest1.0/tcltest2.tcl:jenn2000-10-192-41/+197
| | | | | | | | | | | | | | * tests/tcltest2.test * doc/tcltest2.n: Code and documentation cleanup. Modified -verbose to take list of keywords as well as string of letters. Removed Tcl version information from tcltest. Removed tcltest::grep from tcltest package. Added optional 3rd directory argument to makeFile/makeDirectory and removeFile/removeDirectory. * tests/basic.test: Changed references to tcltest::tclVersion to hardcoded numbers. * generic/tcl.h: Changed reference to tcltest2.tcl and tcltest.tcl in comments to tests/basic.test.
* * tests/cmdAH.test: extra tests for 'file channels' that includehobbs2000-10-061-11/+66
| | | | | | | multiple interpreter tests and channel sharing * generic/tclIO.c (Tcl_GetChannelNamesEx): corrected function (and consequently 'file channels') to return channels that are actually registered for this specific interp, rather than this thread.
* * tests/tcltest.test: Modified the new form of the testjenn2000-09-291-237/+272
| | | | | | command to accept both attribute-value pairs and command line options. Updated the tests and the documentation for this new format. Also changed the option names for the test command.
* * tests/stack.test: prevented possible crash on systems with lowhobbs2000-09-291-3/+23
| | | | | | default stacksize (Tru64, AIX) in infinite recursion test. A solution to check remaining stack space in the core is best, but hard to do in a cross-platform manner.
* * tests/fCmd.test (fCmd-6.20): corrected test to removehobbs2000-09-292-34/+11
| | | | | | | c:/tcl8975@ after creating it. * tests/fileName.test: cleaned up the testing of glob patterns for c:/globTest (Windows) to directly create/remove directory.
* up-port of the stacked channel implementation rewrite in 8.3.2 tohobbs2000-09-281-0/+940
| | | | 8.4a2 code base, merged in with some existing new 8.4a2 features.
* * tests/socket.test: removed doTestsWithRemoteServer constrainthobbs2000-09-211-28/+14
| | | | | from socket-12.*. It requires 'exec', not a remote server. Cleaned up some coding errors.
* * library/tcltest1.0/pkgIndex.tcl: Updated to load tcltest 2.0.jenn2000-09-205-55/+1180
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * library/tcltest1.0/tcltest2.tcl: New version of tcltest. Cleanup of command line parsing: allows users to specify command line arguments through an environment variable named TCLTEST_OPTIONS [RFE: 3748], does not respond to incorrect arguments, and forces usage of entire flag name when using command line arguments. Defines accessor procs for all tcltest variables. Allows users to use 'return' in test scripts. Allow users to specify whether test files should be sourced or run in a separate process. 'all.tcl' code moved to tcltest package. 'test' proc modified to use attribute-value pairs. Allow users to specify what return codes, output, and errors can be compared and whether these values should be compared using regexp, glob, or exact matching. makeDirectory & removeDirectory now operate with respect to temporaryDirectory [Bug: 6001]. Test results from tests run in slave interpreters are now included in test totals [Bug: 1493]. Test files that return error values are now reported. * tests/all.tcl: Added code to check for the tcltest version loaded; modified to figure out which tests to run based on the tcltest version loaded. * tests/tcltest.test: Modified to explicitly load version 1.0 of tcltest. * tests/tcltest2.test: New test suite for tcltest; includes all of the old tests plus new ones reflecting changes made for version 2.0. * tests/cmdAH.test: Added singleTestInterp constraint to cmdAH-31.2; this test does not run if tests aren't sourced into a single interpreter. * tests/socket.test: Fixed two tests that were referencing variables outside of scope. * tools/tcl.wse.in: Added code to install tcltest2.tcl. * doc/tcltest2.n: New documentation for tcltest version 2.0. Removes documentation for tcltest namespace variables. Adds documentation for new tcltest procs. * unix/mkLinks: Added code to link to tcltest2.n. * generic/tcl.h: Added comment to modify tcltest2.tcl as well as tcltest.tcl for version changes.
* * generic/tclCmdMZ.c (Tcl_RegexpObjCmd): When using -all, allericm2000-09-201-1/+5
| | | | | | | attempts after the first to match the regexp against the string should include the TCL_REG_NOTBOL flag, to avoid erroneously matching ^ in the middle of the string. Added code to set this flag after the first pass through the matching loop. [Bug: 6284].
* * tests/cmdIL.test: Added a test for fix for [Bug: 6212].ericm2000-09-171-1/+17
| | | | | * generic/tclCmdIL.c (Tcl_LsortObjCmd): Applied patch from [Bug: 6212], which corrected an error in the handling of the -index option.
* * tests/string.test: extended string repeat testshobbs2000-09-061-1/+23
|
* * tests/trace.test: Extended array tracing tests.ericm2000-08-251-8/+27
| | | | | | | | | | * doc/trace.n: Clarified information about when array traces will be fired. * generic/tclVar.c (Tcl_ArrayObjCmd): Corrected call to CallTraces (for TCL_TRACE_ARRAY) to only be called when the variable is either an array or is undefined, to ensure that array traces do not fire for scalar variables.
* * doc/trace.n: Updated documentation for new syntax; flagged oldericm2000-08-251-225/+582
| | | | | | | | | | | | | | | | | | | | | | | | | | syntax as deprecated; added documentation for command rename/delete traces and variable array traces. * tests/trace.test: Updated tests for new trace syntax; new tests for command rename/delete traces; new tests for array traces. * generic/tclVar.c: Support for new trace syntax; support for TCL_TRACE_ARRAY. * generic/tclStubInit.c: * generic/tclDecls.h: * generic/tcl.decls: Stub functions for command rename/delete traces. * generic/tcl.h: * generic/tclInt.h: * generic/tclBasic.c: Support for command traces. * generic/tclCmdMZ.c (TclTraceVariableObjCmd): Patched to support new [trace] syntax: trace {add|remove|list} {variable|command} name ops command Added support for command traces (rename, delete operations). Added support for TCL_TRACE_ARRAY at Tcl level (array operation for variable traces).
* Added check for non-arrays for [array statistics].ericm2000-08-211-2/+5
|
* * tests/indexObj.test: Added tests using the [testwrongnumargs]ericm2000-08-071-1/+20
| | | | | | | | | | | command to test Tcl_WrongNumArgs. * generic/tclTest.c (TestWrongNumArgsObjCmd): Added test function for the Tcl_WrongNumArgs function. * generic/tclIndexObj.c (Tcl_WrongNumArgs): Corrected algorithm to not insert a space before the message component when objc == 0 [Bug: 6078].
* Removed dead space at end of file.ericm2000-07-311-13/+1
|
* * tests/pkgMkIndex.test: Added tests for pkg_compareExtension.ericm2000-07-191-1/+21
| | | | | | | * library/package.tcl: Enhanced pkg_compareExtension to handle Unixes which tack the version number on to the end of library names (eg, foo.so.1.2); such filenames will be correctly matched. (Patch from Vince Darley).
* * tests/opt.test: Removed references to Lfirst, Lrest functions.ericm2000-07-181-12/+1
| | | | | | | * library/opt0.4/optparse.tcl: Applied patch from Chris Nelson, which replaces the [Lfirst] function with an inline [lindex ... 0] and [Lrest] with [lrange ... 1 end], for better performance. [RFE: 6019]
* * library/msgcat1.0/msgcat.tcl:ericm2000-07-171-3/+19
| | | | | | | | | | | * doc/msgcat.n: * tests/msgcat.test: Applied patches from Chris Nelson, to provide the mcmset function, which allows the translator to set multiple string translations in a single function call, rather than requiring many calls to mcset. [RFE: 6000, 5993]. In addition, these patches correct mcload to use utf-8 encoding on when reading message catalog files, and provides for better default behavior for determining the locale on a Windows system.
* * tests/msgcat.test:ericm2000-07-061-1/+4
| | | | | | | * library/msgcat1.0/msgcat.tcl: Applied patch from Christian Krone, to provide extended args support for msgcat::unknown, which is used for strings without a known translation in the current locale [Bug: 5984].
* * tests/stringObj.test: Tweaked tests to avoid hardcodedericm2000-06-281-9/+30
| | | | | high-ASCII characters (which will fail in multibyte locales); instead used \uXXXX syntax. [Bug: 3842].
* reduced unnecessary iterations in http-3.13hobbs2000-06-021-3/+3
|
* 2000-05-29 Sandeep Tamhankar <sandeep@scriptics.com>hobbs2000-06-021-2/+11
| | | | | | | | | | | | | | | * tests/http.test * doc/http.n * library/http2.3/http.tcl: Fixed bug 5741, where unsuccessful geturl calls sometimes leaked memory and resources (sockets). Also, switched around some of the logic so that http::wait never throws an exception. This is because in an asynchronous geturl, the command callback will probably end up doing all the error handling anyway, and in an asynchronous situation, the user expects to check the state when the transaction completes, as opposed to being thrown an exception. For the http package, this menas the user can check http::status for "error" and http::error for the error message after doing the http::wait.
* * tests/set-old.test:hobbs2000-06-011-2/+41
| | | | | | * doc/unset.n: * generic/tclVar.c (Tcl_UnsetObjCmd): added -nocomplain and -- options to unset, to allow for a silent unset operation.
* * generic/tclVar.c (Tcl_ArrayObjCmd): Added support for regexp andericm2000-05-311-2/+43
| | | | | | | | | | exact matching for [array names] command. [RFE: 3684]. * doc/array.n: Added documentation for [array names -exact/-regexp/-glob] [RFE: 3684]. * tests/set-old.test: Added tests for [array names -exact/-regexp/-glob] [RFE: 3684].
* * tests/info.test:hobbs2000-05-271-3/+20
| | | | | | | | * doc/info.n: * generic/tclIOUtil.c (Tcl_EvalFile): * generic/tclCmdIL.c (InfoScriptCmd): added ability to set the info script return value [info script ?newFileName?]. This will be beneficial for virtual file system programs. [Bug: 4225]
* * tests/string.test: added string map tests for the one-pair case,hobbs2000-05-262-30/+23
| | | | | corrected tests to reflect improved error messages in first/last. Added tests against mem overrun in string index bytearray case.
* * tests/clock.test: Added test for "2 days 2 hours ago" styleericm2000-05-181-1/+6
| | | | | | | | | | specifications. * generic/tclDate.c: Regenerated from tclGetDate.y. * generic/tclGetDate.y: Tweaked grammar to properly handle the "ago" keyword when it follows multiple relative unit specifiers, as in "2 days 2 hours ago". [Bug: 5497].
* * doc/namespace.n:hobbs2000-05-111-4/+24
| | | | | | * tests/namespace.test: * generic/tclNamesp.c (Tcl_NamespaceObjCmd): added 'namespace exists' command. [Bug: 4665]
* * doc/source.n:hobbs2000-05-111-2/+8
| | | | | | | | | * doc/Eval.3: * tests/source.test: * generic/tclIOUtil.c (Tcl_EvalFile): added explicit \32 (^Z) eofchar (affects Tcl_EvalFile in C, "source" in Tcl). This was implicit on Windows already, and is now cross-platform to allow for scripted documents.
* test fixhobbs2000-05-101-4/+6
|
* * tests/lsearch.test:ericm2000-05-091-6/+186
| | | | | | * doc/lsearch.n: * generic/tclCmdIL.c (Tcl_LsearchObjCmd): Extended [lsearch] to support sorted list searching and typed list searching. [RFE: 4098].
* * doc/expr.n:hobbs2000-05-092-8/+59
| | | | | | | | | | | | * tests/expr.test: * tests/expr-old.test: added tests for 'eq' and 'ne' * generic/tclExecute.c: * generic/tclCompile.h: added INST_STREQ and INST_STRNEQ opcodes that do strict string comparisons. * generic/tclCompExpr.c: added 'eq' and 'ne' string comparison operators. * generic/tclParseExpr.c (GetLexeme): added 'eq' and 'ne' expr parse terms (string (in)equality check).
* * tests/string.test: extended string match testshobbs2000-05-081-1/+34
|
* * tests/set-old.test:ericm2000-05-081-3/+28
| | | | | * doc/array.n: * generic/tclVar.c: Added [array statistics] command [RFE: 4557]
* * tests/compile.test:hobbs2000-05-035-30/+29
| | | | | | | | | | * tests/init.test: * tests/proc.test: * tests/proc-old.test: * tests/rename.test: * generic/tclProc.c: reworked error return for procedures with incorrect args to be like the C Tcl_WrongNumArgs, where a "wrong # args: ..." message is printed out with the args list.
* 2000-05-02 Andreas Kupries <a.kupries@westend.com>kupries2000-05-021-3/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Overall changes: (1) Implementation of joinable threads for all platforms. (2) Additional API's for channels. Required to allow the thread extension to move channels between threads. * generic/tcl.decls (lines 1360f): Added Tcl_JoinThread, Tcl_IsChannelShared, Tcl_IsChannelRegistered, Tcl_CutChannel, Tcl_SpliceChannel, Tcl_IsChannelExisting and Tcl_ClearChannelHandlers (slots 394 to 400). * generic/tclIO.c: Implemented Tcl_IsChannelRegistered, Tcl_IsChannelShared, Tcl_CutChannel, Tcl_SpliceChannel, Tcl_IsChannelExisting and Tcl_ClearChannelHandlers. Tcl_CutChannel uses code from CloseChannel. Replaced this code by a call to Tcl_CutChannel. Replaced several code fragments adding channels to the channel list with calls to Tcl_SpliceChannel. Removed now unused variables from CloseChannel and Tcl_UnstackChannel. Tcl_ClearChannelHandlers uses code from Tcl_Close. Replaced this code by a call to Tcl_ClearChannelHandlers. Removed now unused variables from Tcl_Close. Added the subcommands 'cut', 'forgetch', 'splice' and 'isshared' to the test code (TclTestChannelCmd). * unix/tclUnixThread.c: Implemented Tcl_JoinThread using the pthread-functionality. * win/tclWinThrd.c: Fixed several small typos in comments. Implemented Tcl_JoinThread using a platform independent emulation layer (see generic/tclThreadJoin.c below). Added 'joinLock' to serialize Tcl_CreateThread and TclpExitThread to prevent a race for joinable threads. * mac/tclMacThrd.c: Implemented Tcl_JoinThread using a platform independent emulation layer (see generic/tclThreadJoin.c below). Due to the cooperative nature of threading on this platform the race mentioned above is not present. * generic/tclThreadJoin.c: New file. Contains a platform independent emulation layer helping in the implementation of joinable threads for the win and mac platforms. * generic/tclInt.h: Added declarations for TclJoinThread, TclRememberJoinableThread and TclSignalExitThread. These procedures define the API of the emulation layer for joinable threads (see generic/tclThreadJoin.c above). * win/Makefile.in: * win/makefile.vc: Added generic/tclTheadJoin.o to the rules. * mac/: I don't know to which file generic/tclTheadJoin.o has to be added to so that it compiles. Sorry. * unix/tclUnixChan.c: #ifdef'd the thread-local list of file channels as it prevents us from transfering channels. To restore this we may need an extended interface to drivers in the future. Target: 9.0. Found while testing the new transfer of channels. The information in this list for a channel was left behind and then crashed the system during finalization. * generic/tclThreadTest.c: Added -joinable flag to 'testthread create'. Added subcommand 'testthread join'. * doc/CrtChannel.3: Added documentation for Tcl_IsChannelRegistered, Tcl_IsChannelShared, Tcl_CutChannel, Tcl_SpliceChannel, Tcl_IsChannelExisting and Tcl_ClearChannelHandlers. * doc/Thread.3: Added documentation for Tcl_JoinThread. * tests/thread.test: Added tests for joining of threads.
* 2000-04-21 Sandeep Tamhankar <sandeep@scriptics.com>sandeep2000-04-221-2/+1
| | | | | | | | | | | * library/http2.1/http.tcl: Fixed a newly introduced bug where if there's a -command callback and something goes wrong, geturl threw an exception, called the callback, and unset the token. I changed it so that it will not call the callback when throwing an exception (so the caller only finds out about a given error from one place). Also, fixed http::ncode so that it actually gives you back the http return code (i.e. 200, 404, etc.) instead of the first digit of the version of HTTP being used (i.e. 1).
* * msgcat.n: Added docs for new behavior from patch in [Bug: 4158].ericm2000-04-111-4/+98
| | | | | | | | | | | | | * msgcat.test: Added tests for new behavior from patch in [Bug: 4158]. * msgcat.tcl: Applied patch from [Bug: 4158], which enables msgcat::mc to search the entire namespace ancestry chain for message translations (ie, first it checks the current namespace, then the parent, then the parent's parent, etc). Also allows the specification of additional args for msgcat::mc; if extra args are given, the [format] command is used to substitute the additional args in the translated message.
* * win/tclWinPipe.c (TclpCreateTempFile): Added conversion ofericm2000-04-101-1/+24
| | | | | | | | contents string from UTF to native encoding [Bug: 4030]. * tests/regexp.test: Added tests for infinite looping in [regexp -all]. * generic/tclCmdMZ.c: Fixed infinite loop bug with [regexp -all] [Bug: 4981].
* * tests/*.test: Changed all occurances of "namespace importericm2000-04-10121-248/+248
| | | | ::tcltest" to "namespace import -force ::tcltest" [Bug: 3948].
* * tests/reg.test (matchexpected): corrected tests to use tcltesthobbs2000-04-101-18/+27
| | | | constraint types to skip certain tests.
* Added "server closes without reading post data" case.welch2000-04-092-48/+146
|
* * tests/fCmd.test: marked test 8.1 knownBug because it ishobbs2000-04-081-12/+17
| | | | | dangerous on poorly configured systems [Bug: 3881] and added 8.2 to keep essence of 8.1 tested.
* * tests/foreach.test:hobbs2000-04-044-35/+35
| | | | | | * tests/namespace.test: * tests/var.test: Added lsorts to avoid random sorted return problems. [Bug: 2682]
* * generic/tclGet.c (Tcl_GetDouble): Added additional conditions toericm2000-03-311-1/+8
| | | | | | | | | | | | | | | | | error test (previously only errno was checked, but the return value of strtod() should be checked as well). [Bug: 4118]. * tests/exec.test: Added test for proper conversion of UTF data when used with "<< $dataWithUTF" on exec's. * unix/tclUnixPipe.c (TclpCreateTempFile): Added Tcl_UtfToExternalDString call, so that if there is UTF content in the string it will be properly converted to the system encoding before being written [Bug: 4030]. (TclpCreateTempFile): Added a check on the return value of tmpnam; some systems (Linux, for example) will start to return NULL after tmpnam has been called TMP_MAX times; not checking for this can have bad results (overwriting temp files, core dumps, etc.)
* * tests/httpd: removed unnecessary 'puts stderr "Post Dispatch"'hobbs2000-03-272-4/+3
| | | | | | | * tests/namespace.test: * generic/tclNamesp.c (Tcl_Export): added a uniq'ing test to the export list so only one instance of each export pattern would exist in the list.