Age | Commit message (Collapse) | Author | Files | Lines |
|
Currently signals can only be delivered to a single interpreter.
To avoid confusion where currently this is the most recently created
interpreter, don't create the signal command and handle signals in child interpreters.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
The return code was the wrong sense.
Also, load 'interp' if possible.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
|
|
It is wrong to call Jim_WrongNumArgs() with argc == 0.
Instead -1 should be returned from the subcmd function to display the standard error message.
Add a --maintainer check for this condition in Jim_WrongNumArgs() and fix the zlib unit tests.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
And improve the tests
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
|
|
- integer version is much faster
- handle -ve numbers
- ** is right associative
- add tests from Tcl 8.6
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Previously two adjacent terms were incorrectly accepted, such as in
pow(2 3)
Correctly generate an error in this case and improve the error
message when an expression fails to parse correctly.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Previously math functions with multiple arguments were handling poorly.
For example: pow(1.0 + 3.0 - 2, .8 * 5)
was evaluated as: pow(1.0 + 3.0, 2 - .8 * 5)
Now commas correctly separate function parameters.
Also, the error messages are more consistent and informative in the case
of an invalid expression.
Update and re-enable tests in tests/expr-old.test accordingly
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
And enable some more math tests
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
* named boolean values in `expr` are internally converted to int
* named constants are lower-case only
|
|
This test is unreliable since the OS may perform additonal caching.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Including documentation and tests
|
|
tcl instead
|
|
It is necessary to read output from the pipe before waiting
for children to exit to avoid the output filling up and blocking.
The error results still needs to be read after the children have
exited, since it is read from a temp file, not a pipe.
Increase the length of the input to test exec-8.1 to catch
the problem.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
value in different orders.
|
|
Many Tcl regexp tests now work correctly with Jim regexp
Also update regsub/regexp wrong # args error message to match Tcl 8.6
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
These are the negated versions of \d, \w and \s
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
|
|
Should just replace with the bare backslash, not backslash '\0'
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Reported-by: Svyatoslav Mishyn <juef@openmailbox.org>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Can happen if running interactively or via -e
Reported-by: Stuart Cassoff <stwo@bell.net>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Reported-By: Stuart Cassoff <stwo@bell.net>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
If a script has a missing bracket (for example), currently
it is silently ignored, except by [source]
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Import some additional tests from the Tcl test suite.
Add more Tcl compatibility to tcltest.tcl
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Fix the case where the pattern/filename contains a space
Respect the —tails option, but generate an error if -types is given.
Change the error message on no match to be Tcl-compatible
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
- Add wide() function to [expr] (same as int())
- Small error message changes
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Allow 3rd party tests to be written and use:
package require tcltest
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Change the error message to match Tcl 8.6
"expected floating-point number" instead of "expected number"
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Commit 8e28d066 "fixed" infinite namespace import
recursion by simply disabling support for import.
This commit restores support by detecting self-import.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
|
|
|
|
Haiku doesn't seem to trigger the "readable" event
on a connected socket with no data, so use the "writable" event instead
since this seems to work on all platforms.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Throw an error if a script or expression is missing a trailing bracket, brace
or quote rather than simply ignoring the error.
Reported-by: Florian Schäfer <florian.schaefer+github@gmail.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Only do fast dict->list conversion if there is no string rep
When converting list->dict, generate the string rep of a shared list to avoid
loss of info when converting to dict.
Also add a relevent test to dict.test
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Currently returns the error message but does not set JIM_ERR
Also add a test case
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Detect and generate an appropriate message if the variable name
is an array element (dict sugar syntax)
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
But still return non-zero if there are any errors
On some systems there are known test failures
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Use [switch] instead
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Resolve the tailcall command immediately in [tailcall] and stash it.
If a tailcall is currently being evaluated, new tailcalls in the same
frame are merged/deferred to evaluate in the same C stack frame.
Can't merge tailcall evaluations across uplevel.
Add some tests for these cases
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
dict for, values, incr, append, lappend, update, replace and info
Also implement array stat (the same as dict info)
Note that [dict info] and [array stat] are for useful for checking
the behaviour of the hash randomiser
Add Jim_EvalEnsemble()
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|