busybox/shell/hush_test/hush-psubst
Denys Vlasenko 9ee5892798 ash: expand: Fix trailing newlines processing in backquote expanding
Upstream commit:

    Date: Mon, 29 Apr 2019 19:13:37 +0500
    expand: Fix trailing newlines processing in backquote expanding

    According to POSIX.1-2008 we should remove newlines only at the end of
    the substitution. Newlines-only substitions causes dash to remove
    newlines before beggining of the substitution. The following code:

        cat <<END
        1
        $(echo "")
        2
        END

    prints "1<newline>2" instead of expected "1<newline><newline>2".

    This patch fixes trailing newlines processing in backquote expanding.

    Signed-off-by: Nikolai Merinov <n.merinov@inango-systems.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2020-02-17 10:24:32 +01:00
..
emptytick.right hush: fix exit code propagation from cmd. +45 bytes 2009-11-16 02:00:03 +01:00
emptytick.tests hush: fix exit code propagation from cmd. +45 bytes 2009-11-16 02:00:03 +01:00
falsetick.right hush: fix var=exit 2 not setting $? to 2 2010-05-20 14:27:09 +02:00
falsetick.tests hush: fix var=exit 2 not setting $? to 2 2010-05-20 14:27:09 +02:00
falsetick2.right hush: fix a few more corner cases with empty-expanding cmds 2018-04-05 15:15:53 +02:00
falsetick2.tests hush: fix a few more corner cases with empty-expanding cmds 2018-04-05 15:15:53 +02:00
tick_huge.right hush: more rodust detection of unterminated strings etc; 2009-04-08 21:51:33 +00:00
tick_huge.tests hush: more rodust detection of unterminated strings etc; 2009-04-08 21:51:33 +00:00
tick_in_heredoc.right ash: expand: Fix trailing newlines processing in backquote expanding 2020-02-17 10:24:32 +01:00
tick_in_heredoc.tests ash: expand: Fix trailing newlines processing in backquote expanding 2020-02-17 10:24:32 +01:00
tick.right
tick.tests
tick2.right
tick2.tests
tick3.right hush: fix handling of \" in quoted/unquoted cmd 2010-09-12 15:05:39 +02:00
tick3.tests hush: fix handling of \" in quoted/unquoted cmd 2010-09-12 15:05:39 +02:00
tick4.right hush: fix for nested $()s with escapes + testsuite 2008-06-12 12:58:20 +00:00
tick4.tests hush: fix for nested $()s with escapes + testsuite 2008-06-12 12:58:20 +00:00
tick5.right hush: wait for cmd to complete, and immediately store its exitcode in $? 2009-11-15 19:58:19 +01:00
tick5.tests hush: wait for cmd to complete, and immediately store its exitcode in $? 2009-11-15 19:58:19 +01:00