Age | Commit message (Collapse) | Author | Files | Lines |
|
Now 'constraint cmd|package' is like 'needs' but sets a constraint
The command to 'needs cmd' and 'constraint cmd' can now take
a subcommand to check.
Add 'constraint|needs eval|expr' to make some constraint checks
simpler.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
A typical error message now looks like this:
t4.tcl:2: Error: syntax error in expression: "blah"
Traceback (most recent call last):
File "t4.tcl", line 14
c 1 2 3
File "t4.tcl", line 10, in c
b a c
File "t4.tcl", line 6, in b
a A14
File "t4.tcl", line 2, in a
expr blah
This is produced by stackdump (that can be replaced), called by errorInfo.
Note that now stacktraces (stacktrace, info stacktrace, $opts(-errorinfo)) include
the running command at each level in addition to proc, file, line. In order for
scripts to detect this new format, a new entry tcl_platform entry has been added:
tcl_platform(stackFormat) = 4 (to signify 4 elements per frame)
In addition, instead of building the error stack frame as the stack
is unwound in response to an error, instead the entire current stack trace
is captured by stacktrace. This means that the trace extends beyond the try/catch
right back to the initial interpreter command.
The 'stacktrace' command is now implemented in C based on the same
code that generates the error stacktrace.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
always include 'proc' even if introspection disabled
correctly set 'proc' at the eval frame level that is currently running
in the given proc. This makes it easier to produce an accurate level stacktrace
even across uplevel, etc.
Update stacktrace to use the new info frame.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
This means that instead of just [list index 2+1], we can now do
[list index end-$n*2+1]
This applies to:
lindex, linsert, lreplace, lset, lrange, lsort, regexp, regsub
string index,first,last,range
Also add tests for both direct integer expressions and indexes.
Still needs doc update.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Loadable modules and tests
Fixes #179
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
When set, failed tests output a complete test command that would
succeed. This is useful when creating new tests.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Makes it easy to skip all tests if the package isn't available
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
It's convenient to support a non-gc lambda, even if references
are disabled.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
In particular, glob2.test was leaving a lot of litter
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
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>
|
|
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>
|
|
Allow 3rd party tests to be written and use:
package require tcltest
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|