diff options
author | Martijn Dekker <martijn@inlv.org> | 2018-12-25 20:44:51 +0000 |
---|---|---|
committer | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2018-12-30 18:11:43 +0000 |
commit | 2d056ebc31231fa40b85a89f54e59c3219ced531 (patch) | |
tree | 43ad4a9c8ab06ca511a6d9b6a15bee3150b39304 /Test/A05execution.ztst | |
parent | 4215fcb1075f4608cf039ae9b593b07580060a70 (diff) | |
download | zsh-2d056ebc31231fa40b85a89f54e59c3219ced531.tar.gz zsh-2d056ebc31231fa40b85a89f54e59c3219ced531.tar.xz zsh-2d056ebc31231fa40b85a89f54e59c3219ced531.zip |
43945 (tweaked to remove test failure, noted in test):
Fix exit statuses from wait for POSIX_BUILTINS mode. Also add tests.
Diffstat (limited to 'Test/A05execution.ztst')
-rw-r--r-- | Test/A05execution.ztst | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/Test/A05execution.ztst b/Test/A05execution.ztst index 5d3d460df..edc561582 100644 --- a/Test/A05execution.ztst +++ b/Test/A05execution.ztst @@ -341,3 +341,56 @@ F:anonymous function, and a descriptor leak when backgrounding a pipeline >17 >19 +# Test 'wait' for unknown job/process ID. + wait 1 + echo $? + wait %% + echo $? + wait %+ + echo $? + wait %- + echo $? + wait %1 + echo $? + wait %foo + echo $? + wait %\?bar +127:'wait' exit status and warning for unknown ID +>127 +>127 +>127 +>127 +>127 +>127 +?(eval):wait:1: pid 1 is not a child of this shell +?(eval):wait:3: %%: no such job +?(eval):wait:5: %+: no such job +?(eval):wait:7: %-: no such job +?(eval):wait:9: %1: no such job +?(eval):wait:11: job not found: foo +?(eval):wait:13: job not found: ?bar + +# Test 'wait' for unknown job/process ID (POSIX mode). + (setopt POSIX_BUILTINS + wait 1 + echo $? + wait %% + echo $? + wait %+ + echo $? + wait %- + echo $? + wait %1 + echo $? + wait %foo + echo $? + wait %\?bar) +127:'wait' exit status for unknown ID (POSIX mode) +>127 +>0 +>127 +>127 +>127 +>127 +# TBD: the 0 above is believed to be bogus and should also be turned +# into 127 when the ccorresponding bug is fixed in the main shell. |