diff options
author | Denys Vlasenko | 2022-08-02 11:13:44 +0200 |
---|---|---|
committer | Denys Vlasenko | 2022-08-02 11:18:11 +0200 |
commit | 1c5455284234e894dfb6086bf7f3e9a6d5d9611f (patch) | |
tree | 00343c8eb06e7753f2aa43da59e3092c6e100ae0 /shell/ash_test | |
parent | 5479c435fde32e720af5e177e95d6364a422885a (diff) | |
download | busybox-1c5455284234e894dfb6086bf7f3e9a6d5d9611f.zip busybox-1c5455284234e894dfb6086bf7f3e9a6d5d9611f.tar.gz |
ash: fix ifs cleanup on error paths
Patch by Alex Gorinson <algore3698@gmail.com>
function old new delta
evalvar 477 495 +18
varvalue 603 618 +15
subevalvar 1557 1572 +15
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 48/0) Total: 48 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/ash_test')
-rw-r--r-- | shell/ash_test/ash-heredoc/heredoc_and_cmd.right | 2 | ||||
-rwxr-xr-x | shell/ash_test/ash-heredoc/heredoc_and_cmd.tests | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/shell/ash_test/ash-heredoc/heredoc_and_cmd.right b/shell/ash_test/ash-heredoc/heredoc_and_cmd.right new file mode 100644 index 0000000..25ae705 --- /dev/null +++ b/shell/ash_test/ash-heredoc/heredoc_and_cmd.right @@ -0,0 +1,2 @@ +./heredoc_and_cmd.tests: line 4: D: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +Y diff --git a/shell/ash_test/ash-heredoc/heredoc_and_cmd.tests b/shell/ash_test/ash-heredoc/heredoc_and_cmd.tests new file mode 100755 index 0000000..197542d --- /dev/null +++ b/shell/ash_test/ash-heredoc/heredoc_and_cmd.tests @@ -0,0 +1,8 @@ +# The bug was only happening with <<REDIR;CMD form below: +M='AAAAAAAAAAAAAAAAA' +fff(){ +date <<000; echo Y +${D?$M$M$M$M$M$M} +000 +} +fff |