aboutsummaryrefslogtreecommitdiff
path: root/tests/misc.test
AgeCommit message (Collapse)AuthorFilesLines
2011-11-25Add [info statics]Steve Bennett1-0/+6
To access static variables (names and values) of a proc Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-09-24Fix script ignored string rep after list operationSteve Bennett1-0/+8
Even if a string has list rep internally, the original string rep (if there is one) should be used when evaluated as a script. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-07-08Fix missing expr error message with || and &&Steve Bennett1-0/+5
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-05-24Small code cleanupsSteve Bennett1-4/+72
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 Bennett1-0/+107
Also add additional tests 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-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 Bennett1-0/+2
Allow tests to run with almost all features disabled
2010-11-22Overhaul unit test frameworkSteve Bennett1-10/+4
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: [split] string with leading nullSteve Bennett1-0/+4
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-11-17Add UTF-8 support to JimSteve Bennett1-0/+3
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Skip tests for features which are not availableSteve Bennett1-0/+1
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Improvements to catch, return, signal, trySteve Bennett1-0/+33
Improve the ability to rethrow errors * Allow return to rethrow an error by accepting '-errorinfo stacktrace' * Also, 'catch ... opts' now also stores opts(-errorinfo) on error * Use these to provide better stack traces from 'case' and 'try' * Implement 'return -level' Make try/on/finally more Tcl 8.6 compatible * With support for 'on' handlers and docs Add support for catch options to try * Otherwise it's hard to use try to catch signals Improvements to signal handling * catch -signal now sets a list of the handled signals as the result * catch -signal won't execute the body at all if a handled signal is pending * up to 64 (jim_wide) signals can now be handled * if catch -signal is nested, the innermost catch will catch the error * new 'signal catch' allows ignored/blocked signals to be examined and cleared. * update docs on signal handling exec should indicate which signal killed the child Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Fix lassign to work properly with an empty listSteve Bennett1-0/+6
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Fix 'format %%'Steve Bennett1-0/+5
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Allow catch to specify what is caughtSteve Bennett1-0/+48
*: Default to the same as Tcl. Not signal, eval, exit. *: Use 'catch -exit' to also catch exit. *: Also map for standard return codes: [info returncodes] *: Also Jim_ReturnCode() *: Add Jim_FindByName() for searching in a char* array *: Fix 'info nameofexectutable' if $::jim_argv0 is not set
2010-10-15Allow incr on unset variableSteve Bennett1-0/+21
From Tcl 8.5, implicitly set variable to 0
2010-10-15Fix null pointer dereferenceSteve Bennett1-0/+10
If the condition expression of a for statement is invalid
2010-10-15Bug fixes and featuresSteve Bennett1-14/+18
Support end+<n> index And generally simplify the index handling Add support for 'info nameofexecutable'
2010-10-15Rework script/subst parser for improved performanceSteve Bennett1-18/+18
*: Keep abc(def) as a single token, but split abc($def) into 4 tokens *: Then optimise when interpolating to keep a reference to the underlying objects *: This speeds up the 'set a($b)' case a lot *: Also avoid so much alloc/realloc when parsing scripts and subst objects Also simplify cmdStruct creation *: Can omit args=-1 for expand *: Makes it easy to calculate the length *: Do it all in a single loop for simplicity, size and speed
2010-10-15Many improvements, bug fixesSteve Bennett1-1/+78
*: 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-15New featuresSteve Bennett1-0/+94
Add unset -nocomplain and tests Implement lrepeat
2010-10-15Source cleanups, typos, add testSteve Bennett1-0/+10
2010-10-15Bug fixes, documentation updatesSteve Bennett1-0/+24
jimsh - retry on EINTR from fgets() Fix 0 -> NULL for 64 bit systems Fix overlapping memcpy Fix jim array dereferencing bug *: Counting of parentheses was incorrect with nested array references *: The result for array dereference wasn't being used properly Add os.uptime command Documentation: autogenerated command index Fix gets when last line has no newline