aboutsummaryrefslogtreecommitdiff
path: root/test.tcl
AgeCommit message (Collapse)AuthorFilesLines
2010-10-15Move test.tcl to tests/jim.testSteve Bennett1-4373/+0
And other small testing improvements Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Update test.tcl for new regsub/regexp error messageSteve Bennett1-8/+8
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Add Jim_SetResultFormatted() for simplied messagesSteve Bennett1-2/+2
Makes creating error messages much simpler Also convert a couple of long if/else to switch Also some error message improvements Also fix some memory leaks
2010-10-15Allow incr on unset variableSteve Bennett1-2/+2
From Tcl 8.5, implicitly set variable to 0
2010-10-15Bug fixes and featuresSteve Bennett1-18/+18
Support end+<n> index And generally simplify the index handling Add support for 'info nameofexecutable'
2010-10-15Many improvements, bug fixesSteve Bennett1-50/+50
*: Allow math functions to be enabled via configure *: Allow support for references to be removed *: Documentation updates *: Jim_ListLength() now returns the result directly *: Optimise list -> dict conversion *: Consistent capitalisation of some structures, functions *: Add support for abbreviations to Jim_GetEnum() *: The commands to 'info' may be abbreviated *: Use abbreviation support in parsing options to 'subst' *: Use Jim_GetEnum() to parse return code names *: Optimise 'array get', 'array set' if no conversion needed *: Import Tcl string.test *: string compare now returns -1,0,1 like Tcl *: Fix 'string last' with index=0 *: Add support for 'string reverse' *: Add -nocase option to 'string equal' *: Fix infinite loop in 'string repeat str -1' *: Support braced patterns in glob *: glob should not return dot files unless the pattern starts with . *: Simplify glob.tcl by using some new features *: When creating C extensions from Tcl, preserve newlines and invoke with Jim_Eval_Named() to produce more meaningful error messages. *: Also remove all comments, not just those starting in the first column *: Add support for 'n+n' and 'n-n' in string/list indexes (Tcl 8.5) *: Add a level to the stack trace for 'return -code error' *: 'return -code' should also affect the return from 'source' (see Tcl docs) *: Fix lsort -command *: Some systems don't have INFINITY
2010-10-15Allow regsub to return the result as a stringSteve Bennett1-8/+8
From Tcl 8.4 (see TIP 76: http://www.tcl.tk/cgi-bin/tct/tip/76.html)
2010-10-15Source cleanups, typos, add testSteve Bennett1-3/+5
2010-10-15Improvements to 'scan'Steve Bennett1-600/+0
Use libc strtoull() for long long conversions Also some white space cleanup Also remove some win32 vestiges Also improve error messages for array access errors
2010-10-15Implement some new featuresSteve Bennett1-0/+140
Implement 'lreplace' Implement 'string last' Implement 'pid' Implement 'info procs' Implement 'info script' Implement 'info patchlevel' as an alias for 'info version' Implement syslog extensions for jim Fix return code display in jim-interactive.c Make jim more compatible if JIM_TCL_COMPAT is set *: Use tcl_interactive rather than jim_interactive *: Use auto_path rather than jim_libpath Add "." to the lib search path, not "./" Fix a couple of files with CRLF line endings
2010-10-15Make unit tests work better with optional regexpSteve Bennett1-13/+20
2008-11-062008-11-05 Steve Bennett <steveb@workware.net.au>oharboe1-1/+576
* jim-regexp.c: Add regexp extension for regexp and regsub commands
2005-04-05[scope] command removed. Will be added later with the [let] name andantirez1-1/+3
a bit different semantic.
2005-03-29[info args] addedantirez1-1/+23
2005-03-28The behaviour of [scope] modified a bit. Test updated accordingly.antirez1-7/+7
2005-03-28[scope] command + testsantirez1-3/+57
2005-03-24[range] command + testsantirez1-1/+94
2005-03-21Modified test.tcl to report the list of failed tests at the end.antirez1-2/+7
2005-03-21Add the [scan] command and the Jim_ScanString function + tests.chi1-1/+602
The scanformat specification will be converted to a new Jim_Obj of type scanFormatStringObjType, that will contain the parsed representation within its internal object representation. This speed up multiple scanning within e.g. a loop, of objects were cached. For internal scanning we use sscanf currently (I am lazy right now). That means also, we will inherit its incapability to handle string with embedded ZERO. It would be not too difficult to implement another scanner just for the string and charset conversion type that could be able to handle those embedded ZEROs, however. Furthermore two small details were fixed: 1. Jim_DoubleToString should also recognize a number if a leading '+' or '-' occured. By recognizing I mean, add a ".0" to such a number. 2. Jim_StrDupLen should also properly handle duplication of substrings. So now it should be possible to do this: const char *str1 = "This is a long string"; char *substr1 = Jim_StrDupLen(str1, 4); Now substr1 should contain a properly ZERO ended "This".
2005-03-19Jim_GetIndex() bug fixed (SS)antirez1-16/+20
2005-03-15[info level ?level?] fixed. Tests uncommented.antirez1-38/+39
2005-03-11Fix about [rename] against procedures with statics.antirez1-1/+16
Added a regression test to test.tcl (I plan to move everything inside regtest.tcl into test.tcl).
2005-03-10lrange command (me)antirez1-1/+73
2005-03-09[linsert] command added (Clemens Hintze).antirez1-1/+90
Jim_GetIndex() semantic changed to make [lindex] more compatible with Tcl's one, without effects on other commnads (me).
2005-03-08Info exists + tests (Clemens Hintze).antirez1-1/+242
2005-03-06A specializing version of [for] that appears able to match theantirez1-1/+398
performaces of Tcl8.4 for the specialized forms. The implementation is a bit complex so may contain bugs... to handle with care. Also a [for] bug about [continue] was fixed and the regression test added.
2005-03-05[switch] command contributed by Clemens Hintze, modified toantirez1-66/+310
avoid problems with -command and shimmering of the objects passed as [switch] arguments.
2005-03-04jim::libpath renamed into jim.libpath. Also there was a bug listedantirez1-1/+1
in the BUG file about jim.libpath lookup performed using the local variable API that's now fixed. In order to fix the problem the new API call Jim_GetGlobalVariableStr() was added. Jim_GetVariableStr() and Jim_GetGlobalVariableStr() are now exported.
2005-03-04$id: ..$ strings addedantirez1-0/+9
2005-03-04Small README change to reflect LIBS Makefile var.antirez1-0/+36
2005-03-04[split] command added + tests.antirez1-0/+68
2005-03-03[string map ?-nocase? ...] implemented. tests added.antirez1-0/+49
2005-03-02binary safe JimStringMatch()antirez1-93/+0
2005-03-01removed a C99-ismantirez1-1/+17
2005-03-01many string match tests added.antirez1-0/+207
2005-02-28Foreach command! Thanks to Clemens.antirez1-0/+173
Also a patch about empty string and StringAppendString causing memory corruption, and a patch about Jim_WrongNumArgs that I modified because caused other tests to fail.
2005-02-27more tests and a fix for [lindex $a $a $a] sharing hell.antirez1-0/+328
2005-02-27more testsantirez1-1/+486
2005-02-27More test and fixes to pass this tests, mainly about upvar.antirez1-0/+98
2005-02-27Now there is implicit subst in expr's strings like expr {"foo $i" eq $bar}.antirez1-1/+161
More tests. A fix in the parsing code for line number calculation.
2005-02-26Clemem's patch fixing expressions containing newlines parsing.antirez1-1/+154
2005-02-26Initial revisionantirez1-0/+720