aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
2011-05-24Small code cleanupsSteve Bennett8-4/+162
Remove Jim_SetWide() since it is only used by incr More tests for better test coverage Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-05-23Improve list parsingSteve Bennett5-7/+221
Also add additional tests Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-05-23Fix some minor parsing bugsSteve Bennett1-0/+103
And add additional tests Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-05-20Minor cleanups to dict sugar parsingSteve Bennett1-0/+13
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-05-16Fix a parsing bug with quoted strings inside [...]Steve Bennett1-0/+24
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-05-09Automatic proc upref with & syntaxSteve Bennett1-0/+56
e.g. proc a {&b &c} ... Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-05-09Allow proc 'args' to be renamedSteve Bennett1-0/+21
With this syntax: {args newname}. This especially helps with documentation and error messages. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-04-23Clean out the tcltests directorySteve Bennett1-0/+97
Some tests are already in tests/, move some others. Move some examples to the examples directory Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-04-22Fix tcltest v2 for the -setup optionSteve Bennett1-1/+1
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-04-21string trim is now 8 bit cleanSteve Bennett1-0/+15
i.e. supports embedded nulls Also now supports utf-8 trim chars Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-04-21Add some tcltest v2 supportSteve Bennett1-6/+44
Makes it easier to import Tcl tests Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-04-05Better support for eventloop on mingw32Steve Bennett1-1/+3
Which doesn't support select() with no fds. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-01-26scan fails with strings containing nulls0.70Steve Bennett1-0/+12
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-01-24Jim 'string is' doesn't work with unicodeSteve Bennett1-1/+1
So just disable this test Reported-by: Paulo Ferreira <paf@keeh.net> Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-12-21More constraint improvementsSteve Bennett4-10/+14
2010-12-16Implement 'tree' in terms of 'oo'Steve Bennett1-6/+5
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-12-15Fix an object sharing bug for arraysSteve Bennett1-0/+28
Commands which modify variables in place such as append, lappend, incr and lset did not correctly account for modifying a shared array through an array element (dict sugar). Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-12-15Fix for right-to-left associativity of ternary operatorSteve Bennett1-3/+3
Signed-off-by: Patrick WEBER <patrick.weber@live.com> Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-12-14Platform differences for regexp messagesSteve Bennett1-4/+4
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-12-14Fix constraint checkingSteve Bennett3-6/+10
This was completely wrong. The arg order was wrong such that when test constraints were specifed the test was always skipped! Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-12-14Include all double colons as part of the var nameSteve Bennett1-0/+7
e.g. $::a::b is considered as ${::a::b} This helps be more Tcl compatible by allowing fake namespace variables Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-12-06Add more dependencies for testsSteve Bennett13-9/+32
Allow tests to run with almost all features disabled
2010-12-02Add the [exists] commandSteve Bennett1-0/+78
Especially simplifies checking for the existence of procs. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-11-28Bug fix: regexp should not treat \n as |Steve Bennett1-0/+4
Remove a "feature" in the built-in regexp, where a newline in the pattern was treated as alternation, like |. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-11-24Add support for [dict] size, merge, withSteve Bennett1-0/+158
Implement 'dict with' and 'dict merge' as scripts since this is simpler. Use 'dict size' to implement 'array size' Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-11-24Remove the bio extension and add 'copyto' to aio.Steve Bennett1-1/+2
The bio extension is a hangover from TinyTcl. Since Jim supports binary strings, there isn't much need for it except for 'bio copy'. So move this to aio as 'copyto' and implement 'file copy' in terms of it. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-11-22Overhaul unit test frameworkSteve Bennett50-345/+391
Much closer to tcltest now, including constraints. Try to get all appropriate tests running under both Jim and Tcl. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-11-19Better Tcl compatibility for [lrepeat]Steve Bennett1-6/+4
With zero count and also with no list elements Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-11-17Bug fix: [regexp] single braced count was rejectedSteve Bennett1-0/+4
The form {n} should be considered the same as {n,n} Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-11-17Bug fix: [split] string with leading nullSteve Bennett1-0/+4
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-11-17Add UTF-8 support to regexpSteve Bennett5-207/+1236
Plus various ARE enhancements and bug fixes Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-11-17Add UTF-8 support to JimSteve Bennett9-28/+1121
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-11-08Don't hardcode /lib/jimSteve Bennett1-1/+2
Instead, set TCL_LIBRARY based on where jim is installed. This defaults to /usr/local (thus /usr/local/lib/jim), or can be modified with either configure or make. e.g. ./configure --prefix=/usr or make prefix=/usr install Now auto_path is initialised only to TCL_LIBRARY, and doesn't include "." which could be undesirable. At the same time, simplify jimsh initialisation using a script instead of C code. Add the path to the executable to auto_path. Also, no longer use JIM_TCL_COMPAT. Always use the tcl-compatible names, $auto_path and $tcl_interactive. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-11-03Fix 'make test' from the jimtcl directorySteve Bennett1-3/+3
Clash with JIMSH definition Signed-off-by: Steve Bennett <steveb@workware.net.au> Reported-by: Kulcsár Ferenc <crusader@netbsd.hu
2010-10-30Allow extensions to be built/installed as modulesSteve Bennett1-0/+1
This includes C extensions and Tcl extensions Also adds windows support (mingw32 and cygwin) Now the sqlite*, readline and win32 extensions are supported Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-20Switch regexp/regsub to use Jim_GetEnum()Steve Bennett1-8/+6
Provides a better error message on wrong args and allows abbreviations. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-20Fix some outlier issues with regexp/regsubSteve Bennett2-582/+642
Use number of paren expressions with regexp -inline Fix a problem with regexp -start and an anchored search Fix regexp -inline -indices Fix regexp matching with an empty pattern (e.g. ^) Fix some cases where regsub -all did not return all results Fix some regsub cases with an empty pattern Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-20Add support for lsort -indexSteve Bennett1-0/+193
Also bring in some lsort tests from Tcl Also allow lsort to be reentrant (but not thread safe) Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Fix regsub to support strings with embedded nullsSteve Bennett1-1/+1
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Fix a concat bugSteve Bennett1-0/+32
If a string ended in backslash-space, the trailing space was lost. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Fix error message for deleting nonexistent procSteve Bennett1-0/+155
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Fix some problems with global and upvarSteve Bennett1-0/+323
Redefining a link with upvar or global gave an error. Trying to access a non-existent var via a link gave the wrong error message. Added Tcl upvar tests Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Portability fixesSteve Bennett1-2/+4
Especially for eCos, mingw32 and cygwin Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Implement 'pid handle'Steve Bennett1-0/+48
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Skip tests for features which are not availableSteve Bennett13-11/+32
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Source location for failed tests was wrongSteve Bennett1-1/+15
That is, tests which didn't fail but did not give the expected result Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Change tree API to be object-basedSteve Bennett1-43/+43
A small change, but makes for a more natural interface Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Use $::env to build environment for execSteve Bennett1-0/+39
Also, switch to using 'sh -c' for the vfork() implementation because it then allows command line redirection, pipes and setting the environment. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Add do-nothing fileevent for Tcl compatibilitySteve Bennett1-5/+5
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Don't depend on specific regexp messagesSteve Bennett1-6/+6
These can vary on different systems Signed-off-by: Steve Bennett <steveb@workware.net.au>