hush/shell/ash_test/ash-misc
Denys Vlasenko eb17b6f6c9 ash: eval: Return status in eval functions
Backported from dash:

    eval: Return status in eval functions

    The exit status is currently clobbered too early for case statements
    and loops.  This patch fixes it by making the eval functions return
    the current exit status and setting them in one place -- evaltree.

    Harald van Dijk pointed out a number of bugs in the original patch.

function                                             old     new   delta
evalcommand                                         1226    1242     +16
cmdloop                                              383     398     +15
evalfor                                              223     227      +4
evalcase                                             271     275      +4
localcmd                                             348     350      +2
evaltreenr                                           927     928      +1
evaltree                                             927     928      +1
evalsubshell                                         150     151      +1
evalpipe                                             356     357      +1
parse_command                                       1585    1584      -1
evalloop                                             177     164     -13
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 9/2 up/down: 45/-14)             Total: 31 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-09-28 19:41:57 +02:00
..
command2.right ash: add tests for failures of the exec and command builtins 2015-10-30 22:19:06 +01:00
command2.tests ash: add tests for failures of the exec and command builtins 2015-10-30 22:19:06 +01:00
command.right ash: respect -p flag when command builtin is run with -v/-V 2015-10-29 20:05:32 +01:00
command.tests ash: respect -p flag when command builtin is run with -v/-V 2015-10-29 20:05:32 +01:00
echo_write_error.right echo: do not retry on write errors 2011-02-07 02:03:51 +01:00
echo_write_error.tests fix file mode 2015-07-13 03:52:32 +02:00
errexit1.right ash: exit after subshell error when errexit option is set 2016-09-17 23:28:23 +02:00
errexit1.tests ash: exit after subshell error when errexit option is set 2016-09-17 23:28:23 +02:00
exec.right ash: add tests for failures of the exec and command builtins 2015-10-30 22:19:06 +01:00
exec.tests ash: add tests for failures of the exec and command builtins 2015-10-30 22:19:06 +01:00
exitcode1.right ash: eval: Return status in eval functions 2016-09-28 19:41:57 +02:00
exitcode1.tests ash: eval: Return status in eval functions 2016-09-28 19:41:57 +02:00
for.right ash: allow newline after variable name in for loop 2015-10-29 19:30:55 +01:00
for.tests ash: allow newline after variable name in for loop 2015-10-29 19:30:55 +01:00
func1.right ash: copy function tests from hush testsuite 2015-11-04 14:48:16 +01:00
func1.tests ash: copy function tests from hush testsuite 2015-11-04 14:48:16 +01:00
func2.right ash: copy function tests from hush testsuite 2015-11-04 14:48:16 +01:00
func2.tests ash: copy function tests from hush testsuite 2015-11-04 14:48:16 +01:00
func3.right ash: copy function tests from hush testsuite 2015-11-04 14:48:16 +01:00
func3.tests ash: copy function tests from hush testsuite 2015-11-04 14:48:16 +01:00
func4.right ash: copy function tests from hush testsuite 2015-11-04 14:48:16 +01:00
func4.tests ash: copy function tests from hush testsuite 2015-11-04 14:48:16 +01:00
func5.right ash: copy function tests from hush testsuite 2015-11-04 14:48:16 +01:00
func5.tests ash: copy function tests from hush testsuite 2015-11-04 14:48:16 +01:00
func_args1.right ash: copy function tests from hush testsuite 2015-11-04 14:48:16 +01:00
func_args1.tests hush-misc/func_args1.tests: remove "UNFIXED BUG", it does not fail 2015-11-04 14:50:19 +01:00
func_bash1.right ash: add support for bash 'function' keyword 2015-11-04 19:30:24 +01:00
func_bash1.tests ash: add support for bash 'function' keyword 2015-11-04 19:30:24 +01:00
func_local1.right ash: copy function tests from hush testsuite 2015-11-04 14:48:16 +01:00
func_local1.tests ash: copy function tests from hush testsuite 2015-11-04 14:48:16 +01:00
func_local2.right ash: copy function tests from hush testsuite 2015-11-04 14:48:16 +01:00
func_local2.tests ash: copy function tests from hush testsuite 2015-11-04 14:48:16 +01:00
last_amp.right
last_amp.tests
local1.right ash: make "locak VAR" unset VAR (bash does that) 2014-03-16 18:41:11 +01:00
local1.tests ash: make "locak VAR" unset VAR (bash does that) 2014-03-16 18:41:11 +01:00
local2.right ash: only allow local variables in functions 2015-10-29 20:33:44 +01:00
local2.tests ash: only allow local variables in functions 2015-10-29 20:33:44 +01:00
nulltick1.right
nulltick1.tests
shift1.right
shift1.tests
source1.right
source1.tests
source2.right
source2.tests
tickquote1.right ash: remove parsebackquote flag 2015-07-13 03:50:27 +02:00
tickquote1.tests ash: remove parsebackquote flag 2015-07-13 03:50:27 +02:00