busybox/shell/ash_test
Denys Vlasenko c2058ec98c ash: Expand here-documents in the current shell environment
Upstream commit:

    Date: Sun, 11 Nov 2007 15:27:00 +0800
    Expand here-documents in the current shell environment

    Previously we always expanded here-documents in a subshell.  This is
    contrary to the POSIX specification and how other shells behave.  What's
    more this slows down many expansions due to the extra fork (however, it
    must be said that it is possible for it speed up certain expansions by
    running it simultaneously with the command on two CPUs).

    This patch move the expansion into the current shell environment.

    Test case:

            unset a
            cat <<- EOF > /dev/null
                    ${a=NOT}
            EOF
            echo ${a}BAD

    Old result:

            BAD

    New result:

            NOTBAD

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2020-02-22 20:29:36 +01:00
..
ash-alias small ash testsuite, adapted from bash 2007-03-05 00:27:50 +00:00
ash-arith ash: parser: Add syntax stack for recursive parsing 2018-04-02 13:15:37 +02:00
ash-getopts hush: fix "getopts" builtin to not be upset by other builtins calling getopt() 2017-08-29 13:38:30 +02:00
ash-glob ash: expand: Do not quote backslashes in unquoted parameter expansion 2018-08-07 18:58:02 +02:00
ash-heredoc ash: Expand here-documents in the current shell environment 2020-02-22 20:29:36 +01:00
ash-invert add ash testcases 2007-03-05 20:46:46 +00:00
ash-misc hush: make "exit" in trap use pre-trap exitcode - fix for nested trap 2020-02-21 02:55:53 +01:00
ash-parsing hush: fix recent breakage from parse_stream() changes 2018-04-11 20:00:43 +02:00
ash-psubst ash: expand: Fix trailing newlines processing in backquote expanding 2020-02-17 10:24:32 +01:00
ash-quoting ash: expand: Ensure result is escaped in cvtnum 2020-02-21 16:30:44 +01:00
ash-read shell: optional support for read -t N.NNN, closes 10101 2017-07-20 16:09:31 +02:00
ash-redir ash: eval: Fail immediately with redirections errors for simple command 2020-02-20 09:36:51 +01:00
ash-signals ash: copy three tests from hush_test/hush-signals/* 2017-07-24 19:42:46 +02:00
ash-standalone ash: fix nofork bug where environment is not properly passed to a command 2017-11-03 14:16:25 +01:00
ash-vars ash: parser: Only accept single-digit parameter expansion outside of braces 2020-02-17 10:15:35 +01:00
ash-z_slow hush: improve ${var#...}, ${var:+...} and ${var/.../...} - handle quoting 2018-07-17 14:21:38 +02:00
.gitignore ash_test: ignore generated files 2016-03-22 18:15:24 -04:00
printenv.c do not use `a' quoting style in comments 2017-08-02 14:26:33 +02:00
recho.c whitespace cleanup 2010-10-29 11:46:52 +02:00
run-all ash: add all hush parsing tests to ast tests 2017-07-24 02:49:56 +02:00
zecho.c whitespace cleanup 2010-10-29 11:46:52 +02:00