summaryrefslogtreecommitdiff
path: root/Test/C03traps.ztst
AgeCommit message (Collapse)AuthorFilesLines
2018-10-10unposted: another couple of tests for previous commit.Peter Stephenson1-0/+6
This tests different code paths as the -c command option exits in a different fashion from code executed from a script.
2018-10-1043669: ensure explicit exit status is used over implicitPeter Stephenson1-0/+3
2018-10-0943660: extend 43653 when final exit is implicit.Peter Stephenson1-0/+4
Combine logic for case after committed to exit (shell_exiting) with case where exit occurred in a function we nee to unwind (exit_pending). Add sarky note for future generations to be confused at.
2018-10-09unposted: addition to previous trap test suggested by MikaelPeter Stephenson1-0/+3
2018-10-0943653: explicit exit from EXIT trap overrides exit statusPeter Stephenson1-0/+3
2018-07-09users/23531: Error exit/return fixes.Peter Stephenson1-0/+17
Fix regression with trap on left hand side of pipe. Fix forced return from shell structure within nested function. Fix tests exiting too early. Add new test case.
2017-08-31Fix problem with ERR_RETURN.Peter Stephenson1-0/+34
It wasn't suppressed properly in the code following an if in some circumstances, in particular in initialsation scripts and also in a nested function where the caller had suppressed it.
2017-08-2941608 (plus tests): restore ERR_EXIT before function.Peter Stephenson1-0/+35
There was an exception to the usual ERR_EXIT pattern that causes problems when executing a function in an else branch. It seems the exception is no longer needed as the regression tests pass without it.
2017-04-2741012: Fix premature exit from nested function in EXIT trap.Peter Stephenson1-0/+21
Also add check so we don't delay an exit if we were already in an EXIT trap for the main shell, as we should in that case leave immediately.
2016-12-0540100: ERR_EXIT and ERR_RETURN test for anonymous functions.Peter Stephenson1-0/+11
Should trigger on non-zero status at end of function even if behaviour is suppressed by code inside the function at the point the status is set.
2016-12-05Additional case for ERR_RETURN and ERR_EXIT.Peter Stephenson1-0/+17
Don't trigger just because status is non-zero at end of current shell group.
2016-12-05Extra case for ERR_RETURN and ERR_EXIT.Peter Stephenson1-0/+70
Don't trigger just because status is non-zero at end of complex shell construct as this may be a case we've already suppressed.
2016-11-1039901: No EXIT trap on LHS of pipeline.Peter Stephenson1-0/+17
There is a special case if the LHS is a shell construct. Add unit tests for both cases.
2016-11-0839870: ensure exit trap can always runPeter Stephenson1-0/+15
2016-10-0639578: Test more ERR_RETURN cases with "&&" and functionsPeter Stephenson1-0/+30
2016-10-0539571: Fix ERR_EXIT bug with && and function.Peter Stephenson1-9/+22
"foo && bar" inside a function could cause the code outside the function not to perform ERR_EXIT or ERR_RETURN when needed.
2016-10-0539568: "! <complex-command>" suppresses ERR_EXITPeter Stephenson1-0/+27
2016-10-0239540: "! command" should suppress ERR_EXIT and ERR_RETURNPeter Stephenson1-0/+37
2016-03-0738094: Fix POSIX EXIT traps defined in function.Peter Stephenson1-2/+20
These aren't local, so set the local level to 0; else they can get overridden incorrectly.
2016-02-2538024: Improve POSIX and native EXIT traps compatibility.Peter Stephenson1-0/+17
Allow a nested function trap to leave save and restore a POSIX trap. Still fails if the POSIX trap was defined in a function.
2016-02-1737999: Sticky behaviour of EXIT traps.Peter Stephenson1-0/+20
They now have POSIX or non-POSIX behaviour based on the setting of POSIX_TRAPS where the trap was defined, rather than where the trap would (or would not) be executed. Tweaks possible.
2015-10-03unposted: back out 36707, add test case for 36766Barton E. Schaefer1-0/+14
2015-08-09unposted: add tests for outputting traps specified via aliasesMikael Magnusson1-0/+11
2015-07-0935751: Fix ERR_RETURN and ERR_EXIT in "else"Peter Stephenson1-0/+40
2012-12-1330876: fix obscure failures to propagate non-zero statusPeter Stephenson1-0/+11
from optimised simple commands within lists
2010-09-1228253: document -h argument to atribute commandsPeter Stephenson1-0/+17
2010-05-10c.f. 27950: strip bogus whitespace from testsPeter Stephenson1-4/+4
2010-05-0527947: some cases where we should execute EXIT trapsPeter Stephenson1-0/+20
2008-08-3125571: when parsing use line numbers for the start of a token, not the endPeter Stephenson1-88/+0
add test and move debug trap tests to new file
2008-08-3125570: line numbers of complex sublists were wrong, plus testPeter Stephenson1-0/+10
make lineno zlong in another place
2008-08-2525532: problem skipping assignments etc. with setopt ERREXITPeter Stephenson1-0/+14
2008-08-0725415: Make DEBUG_BEFORE_CMD the default.Peter Stephenson1-0/+13
Reuse ERR_EXIT in DEBUG traps. Clean up trapreturn code.
2008-08-0625400: Rockys test for second part of trapreturn bugPeter Stephenson1-0/+14
2008-08-0525392: test for 25367Peter Stephenson1-0/+38
2007-05-2923486: use {fd} syntax to get fd's for testsPeter Stephenson1-3/+3
2007-01-1223101: various combinations of ZERR with function returns were feature-riddenPeter Stephenson1-0/+63
2006-03-0322277: missed bitPeter Stephenson1-0/+34
2005-08-0921580: Thorsten's patch to make sure that no pre-existing trapsWayne Davison1-1/+4
interfere with the tests.
2005-05-0121215: clean up after autoloaded trap testBart Schaefer1-2/+6
2005-04-1321136: don't leave TRAPEXIT lying around in Test directoryPeter Stephenson1-2/+2
2005-02-06fix autoloaded trap bug; rejig use of trapfuncsPeter Stephenson1-2/+32
(now traplists); improve trap tests
2004-07-2620198: fix TRAPEXIT.Peter Stephenson1-0/+7
2004-03-1019575: Fix problem with trap on EXIT overriding statusPeter Stephenson1-0/+16
2001-10-01test EXIT trap fixPeter Stephenson1-0/+12
2001-04-02moved from ./Test/08traps.ztstSven Wischnowsky1-0/+186