aboutsummaryrefslogtreecommitdiff
path: root/tests/exec.test
AgeCommit message (Collapse)AuthorFilesLines
2023-07-04tcltest: rework constraint systemSteve Bennett1-3/+3
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>
2022-05-08tests: add tests for wait -1Steve Bennett1-0/+4
Only on unix systems, wait for any child process This was broken with a recent commit, so add an explicit test Signed-off-by: Steve Bennett <steveb@workware.net.au>
2021-01-03bootstrap jimsh: pass all testsSteve Bennett1-2/+9
In order to test bootstrap jimsh, it is very helpful if it can pass all the unit tests. - Set tcl_platform(bootstrap) to 1 for bootstrap jimsh or 0 otherwise - Use getref to determine in we have references, not ref since we implement a poor-man's ref for bootstrap jimsh - bootstrap jimsh package doesn't return a "Can't load package" message if loading the package fails - exec tests using [open |command] need pipe - bootstrap jimsh can't set file times with [file mtime] Signed-off-by: Steve Bennett <steveb@workware.net.au>
2017-10-17signal, exec, wait, pid: improvements, especially to execSteve Bennett1-6/+26
- fix popen [open "|pipeline ..."] to return meaningful status in close (but note that stderr is not captured) - popen pipelines can now be used as the target of exec redirection - overally improvements to exec on windows. Now crt file descriptors are used throughout - add support for [pid], [wait] and popen on windows - os.wait is now wait, and integrates with [exec ... &] to be able to wait for running background tasks - [socket pipe] is now also [pipe] and is supported on windows - [file tempfile] is supported on windows - move duplicated code between jim-aio.c and jim-exec.c to jimiocompat.c - Fix [exec] on windows to match unix semantics wrt sharing the parent stream unless redirected rather than using /dev/null - On windows redirect to or from /dev/null is automatically converted to NUL: - If signal support is disabled, implement a minimal Jim_SignalId() for exec and wait - aio now supports getfd, to return the underlying file descriptor. This is used by exec to support redirection, and allows popen channels to support exec redirection. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2017-08-27tests/exec.test: Minor fix for exec-12.1 on hurdSteve Bennett1-1/+1
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2016-08-29tests/exec.test: Add constraint "unix" for 12.1Danyil Bohdan1-2/+4
2016-03-27exec: read output from pipe before waiting for childrenSteve Bennett1-7/+3
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>
2014-01-15tests: fix tests if tclcompat is not enabledSteve Bennett1-0/+1
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2013-08-19Support nulls in [exec] immediate redirectionSteve Bennett1-0/+3
e.g. exec prog <<$data Signed-off-by: Steve Bennett <steveb@workware.net.au>
2013-07-22Ensure that signals can break vwaitSteve Bennett1-0/+1
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-16Fix some tests so they run on mingwSteve Bennett1-7/+8
exec and pid tests
2011-12-13More test speedupsSteve Bennett1-85/+17
Speed up the timer and exec unit tests with smaller sleeps Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-12-12Make sure exec.test cleans up betterSteve Bennett1-10/+13
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-12-02Reduce some delays in testsSteve Bennett1-1/+1
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-09-12Implement full [exec] on mingw/msysSteve Bennett1-3/+3
This also involves some restructuring of the existing implementation to allow for as much reuse as possible. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-11-22Overhaul unit test frameworkSteve Bennett1-5/+6
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-15Skip tests for features which are not availableSteve Bennett1-0/+1
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Small improvements to testsSteve Bennett1-4/+5
Make exec-9.7 test more reliable Quieten jim tests unless running manually Add jim pipe example Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Add exec support for 2>@1Steve Bennett1-0/+4
See TIP #202: http://www.tcl.tk/cgi-bin/tct/tip/202.html
2010-10-15Tests, ehancements and bug fixes for execSteve Bennett1-0/+475
Add Tcl tests for exec Fix some errors exposed by these tests Add support for >&, >>&, |&