From 02d6f1ad7229b62c9386c7063f6525e744536c66 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Tue, 7 Apr 2009 19:56:55 +0000 Subject: hush: fix heredoc expansion of $var and `cmd` function old new delta expand_pseudo_dquoted - 104 +104 setup_heredoc 215 275 +60 done_word 669 691 +22 parse_stream 1899 1902 +3 setup_redirects 196 191 -5 free_pipe 189 183 -6 expand_variables 2349 2229 -120 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 3/3 up/down: 189/-131) Total: 58 bytes --- shell/hush_test/hush-misc/heredoc2.right | 1 + shell/hush_test/hush-misc/heredoc2.tests | 1 + shell/hush_test/hush-misc/heredoc3.right | 8 ++++++++ shell/hush_test/hush-misc/heredoc3.tests | 11 +++++++++++ 4 files changed, 21 insertions(+) create mode 100644 shell/hush_test/hush-misc/heredoc3.right create mode 100755 shell/hush_test/hush-misc/heredoc3.tests (limited to 'shell/hush_test/hush-misc') diff --git a/shell/hush_test/hush-misc/heredoc2.right b/shell/hush_test/hush-misc/heredoc2.right index 72c839c56..66545ae76 100644 --- a/shell/hush_test/hush-misc/heredoc2.right +++ b/shell/hush_test/hush-misc/heredoc2.right @@ -1,6 +1,7 @@ exit EOF-f " echo 1 +echo Hello World moo EOF-f EOF-f f diff --git a/shell/hush_test/hush-misc/heredoc2.tests b/shell/hush_test/hush-misc/heredoc2.tests index 71ab0e83a..19d9c9681 100755 --- a/shell/hush_test/hush-misc/heredoc2.tests +++ b/shell/hush_test/hush-misc/heredoc2.tests @@ -3,6 +3,7 @@ f=1 exit EOF-f " echo $f +echo `echo Hello World` moo EOF-f EOF-f f diff --git a/shell/hush_test/hush-misc/heredoc3.right b/shell/hush_test/hush-misc/heredoc3.right new file mode 100644 index 000000000..9b114fabf --- /dev/null +++ b/shell/hush_test/hush-misc/heredoc3.right @@ -0,0 +1,8 @@ +exit EOF-f +" +echo $f +echo `echo Hello World` +moo + EOF-f +EOF-f f +EOF-f diff --git a/shell/hush_test/hush-misc/heredoc3.tests b/shell/hush_test/hush-misc/heredoc3.tests new file mode 100755 index 000000000..6391e49f9 --- /dev/null +++ b/shell/hush_test/hush-misc/heredoc3.tests @@ -0,0 +1,11 @@ +f=1 + cat <<- EOF-f"" + exit EOF-f +" +echo $f +echo `echo Hello World` + moo + EOF-f +EOF-f f +EOF-f +EOF-f -- cgit v1.2.3