aboutsummaryrefslogtreecommitdiff
path: root/tests/event.test
AgeCommit message (Collapse)AuthorFilesLines
2023-07-10tests: event.test: increase waits in event-11.4Steve Bennett1-3/+3
This test can be at bit flaky on slower machines (perhaps running under a VM or qemu). Signed-off-by: Steve Bennett <steveb@workware.net.au>
2023-07-04tcltest: rework constraint systemSteve Bennett1-16/+4
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>
2023-06-21core: Display errors in a more "pythonesque" waySteve Bennett1-1/+5
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>
2023-02-13vwait: add support for vwait -signalSteve Bennett1-6/+6
To break vwait if a handled signal is received. In this case, the handled signal(s) can be returned by signal check ?-clear? Signed-off-by: Steve Bennett <steveb@workware.net.au>
2020-06-05tests: allow more time for some testsSteve Bennett1-4/+4
If running in a VM with very variable time Signed-off-by: Steve Bennett <steveb@workware.net.au>
2020-05-04tests: Add many new additional tests for code coverageSteve Bennett1-0/+28
readdir, tty, utf8, signal, alarm, kill, file, jimsh, posix, aio, history, interp, pack, unpack, eventloop, exec, load, package, regexp, regsub Signed-off-by: Steve Bennett <steveb@workware.net.au>
2017-11-25tests: remove debugging from event.testSteve Bennett1-2/+0
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2017-11-25tests: If ipv6 sockets can't be bound, don't testSteve Bennett1-2/+15
This is a workaround for IPv6 tests failing on Travis Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-09-01aio: optional argument addrvar for accept.Danyil Bohdan1-1/+34
2014-04-28event.test: Fix test on HaikuSteve Bennett1-2/+2
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>
2013-08-02Correct file handler should be deletedSteve Bennett1-1/+1
Previously, Jim_DeleteFileHandler() would indiscriminately delete the first matching file handler in the list. Instead, it should delete the file handler matching the event mask. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2013-07-22Ensure that signals can break vwaitSteve Bennett1-0/+11
The following should break when a handled signal is caught. catch -signal { vwait forever } Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-12-02Reduce some delays in testsSteve Bennett1-2/+2
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-06-10Add some missing test dependenciesSteve Bennett1-1/+2
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>
2010-11-22Overhaul unit test frameworkSteve Bennett1-7/+8
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-10-15Portability fixesSteve Bennett1-2/+4
Especially for eCos, mingw32 and cygwin 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-15Add do-nothing fileevent for Tcl compatibilitySteve Bennett1-5/+5
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15eventloop improvements and enhancementsSteve Bennett1-41/+76
Move Jim_EvalObjBackground() out of the core to eventloop Time events are now kept and triggered in time order Time handlers are removed before execution Add 'update' Add 'after info' and 'after idle' Include time events in the return from Jim_ProcessEvents() Add Tcl eventloop tests Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Fix some eventloop bugsSteve Bennett1-0/+150
bgerror is supposed to be suppressed subsequently if it returns break vwait should error on invalid array element vwait should return an empty result Don't accept 'after info' since it isn't supported Also add some eventloop tests Signed-off-by: Steve Bennett <steveb@workware.net.au>