hush/shell/ash_test
Denys Vlasenko 35ec818fa2 ash: fix "return N" not setting $? in loop conditionals
Upstream commit 1:

    Date: Mon, 6 Oct 2014 20:45:04 +0800
    [EVAL] Move common skipcount logic into skiploop

    The functions evalloop and evalfor share the logic on checking
    and updating skipcount.  This patch moves that into the helper
    function skiploop.

    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Upstream commit 2:

    Date: Mon, 6 Oct 2014 21:22:43 +0800
    [BUILTIN] Allow return in loop conditional to set exit status

    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=332954

    When return is used in a loop conditional the exit status will
    be lost because we always set the exit status at the end of the
    loop to that of the last command executed in the body.

    This is counterintuitive and contrary to what most other shells do.

    This patch fixes this by always preserving the exit status of
    return when it is used in a loop conditional.

    The patch was originally written by Gerrit Pape <pape@smarden.org>.

    Reported-by: Stephane Chazelas <stephane_chazelas@yahoo.fr>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-10-01 19:56:52 +02:00
..
ash-alias
ash-arith shell/math: deconvolute and explain ?: handling. Give better error message 2010-09-16 11:50:46 +02:00
ash-glob ash,hush: add a test which fails for ash since commit 549deab 2015-09-04 03:33:02 +02:00
ash-heredoc ash: bash-compatible $'...' shouldn't expand in double quotes 2016-04-15 22:16:46 +02:00
ash-invert
ash-misc ash: fix "return N" not setting $? in loop conditionals 2016-10-01 19:56:52 +02:00
ash-quoting ash: fix handling of NULs in $'abc\000def\x00asd'. Closes 9286 2016-09-25 20:54:25 +02:00
ash-read ash testsuite: remove two inadvertent bashisms 2016-10-01 17:30:21 +02:00
ash-redir ash testsuite: remove two more inadvertent bashisms 2016-10-01 17:43:04 +02:00
ash-signals ash testsuite: remove two inadvertent bashisms 2016-10-01 17:30:21 +02:00
ash-standalone ash: fix unset in standalone mode 2010-06-18 14:23:47 +02:00
ash-vars shell testsuite: add trailing newline to var_unbackslash1.tests 2016-09-29 20:02:53 +02:00
.gitignore ash_test: ignore generated files 2016-03-22 18:15:24 -04:00
printenv.c ash_test: printenv: fix missing includes 2016-03-22 18:15:14 -04:00
recho.c whitespace cleanup 2010-10-29 11:46:52 +02:00
run-all ash tests: make test print test name before it is run 2015-10-29 20:34:20 +01:00
zecho.c whitespace cleanup 2010-10-29 11:46:52 +02:00