aboutsummaryrefslogtreecommitdiff
path: root/shell/hush_test
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2009-04-07 19:56:55 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2009-04-07 19:56:55 +0000
commit02d6f1ad7229b62c9386c7063f6525e744536c66 (patch)
treea3b0f3a416913121a30eb40d239eae17404c1046 /shell/hush_test
parent25af86f73d29ee8b74f8776f4e1defe04cf7dcf1 (diff)
downloadbusybox-w32-02d6f1ad7229b62c9386c7063f6525e744536c66.tar.gz
busybox-w32-02d6f1ad7229b62c9386c7063f6525e744536c66.tar.bz2
busybox-w32-02d6f1ad7229b62c9386c7063f6525e744536c66.zip
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
Diffstat (limited to 'shell/hush_test')
-rw-r--r--shell/hush_test/hush-misc/heredoc2.right1
-rwxr-xr-xshell/hush_test/hush-misc/heredoc2.tests1
-rw-r--r--shell/hush_test/hush-misc/heredoc3.right8
-rwxr-xr-xshell/hush_test/hush-misc/heredoc3.tests11
4 files changed, 21 insertions, 0 deletions
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 @@
1exit EOF-f 1exit EOF-f
2" 2"
3echo 1 3echo 1
4echo Hello World
4moo 5moo
5 EOF-f 6 EOF-f
6EOF-f f 7EOF-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
3 exit EOF-f 3 exit EOF-f
4" 4"
5echo $f 5echo $f
6echo `echo Hello World`
6 moo 7 moo
7 EOF-f 8 EOF-f
8EOF-f f 9EOF-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 @@
1exit EOF-f
2"
3echo $f
4echo `echo Hello World`
5moo
6 EOF-f
7EOF-f f
8EOF-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 @@
1f=1
2 cat <<- EOF-f""
3 exit EOF-f
4"
5echo $f
6echo `echo Hello World`
7 moo
8 EOF-f
9EOF-f f
10EOF-f
11EOF-f