hush: fix handling of heredocs not enclosed in groups where they are "declared"
function old new delta fetch_heredocs - 479 +479 parse_and_run_stream 146 148 +2 parse_stream 2787 2296 -491 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/1 up/down: 481/-491) Total: -10 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
Ok1
|
||||
Ok2
|
3
shell/hush_test/hush-heredoc/heredoc_after_compound1.tests
Executable file
3
shell/hush_test/hush-heredoc/heredoc_after_compound1.tests
Executable file
@@ -0,0 +1,3 @@
|
||||
{ cat <<EOF; }; echo Ok2
|
||||
Ok1
|
||||
EOF
|
4
shell/hush_test/hush-heredoc/heredoc_var_expand1.right
Normal file
4
shell/hush_test/hush-heredoc/heredoc_var_expand1.right
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
Ok1:0
|
||||
|
||||
Ok2:0
|
11
shell/hush_test/hush-heredoc/heredoc_var_expand1.tests
Executable file
11
shell/hush_test/hush-heredoc/heredoc_var_expand1.tests
Executable file
@@ -0,0 +1,11 @@
|
||||
x='*'
|
||||
|
||||
cat <<- EOF
|
||||
${x#'*'}
|
||||
EOF
|
||||
echo Ok1:$?
|
||||
|
||||
cat <<EOF
|
||||
${x#'*'}
|
||||
EOF
|
||||
echo Ok2:$?
|
Reference in New Issue
Block a user