From c3adfacd229dd94b1ee4800fb364d514eef4aca5 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 6 Sep 2010 11:46:03 +0200 Subject: hush: fix another corner case with backslashes in heredocs function old new delta parse_stream 2395 2432 +37 Signed-off-by: Denys Vlasenko --- shell/hush_test/hush-misc/heredoc_backslash1.right | 8 ++++++++ shell/hush_test/hush-misc/heredoc_backslash1.tests | 8 ++++++++ 2 files changed, 16 insertions(+) (limited to 'shell/hush_test') diff --git a/shell/hush_test/hush-misc/heredoc_backslash1.right b/shell/hush_test/hush-misc/heredoc_backslash1.right index 234c0172f..2633908fb 100644 --- a/shell/hush_test/hush-misc/heredoc_backslash1.right +++ b/shell/hush_test/hush-misc/heredoc_backslash1.right @@ -1,18 +1,24 @@ Quoted heredoc: a\ b +a\\ + b 123456 -$a-\t-\\-\"-\'-\`-\--\z-\*-\?- -$a-\t-\\-\"-\'-\`-\--\z-\*-\?- c\ Unquoted heredoc: a b +a\ + b 123456 -qwerty-\t-\-\"-\'-`-\--\z-\*-\?- -qwerty-\t-\-\"-\'-`-\--\z-\*-\?- cEOF2 Quoted -heredoc: a\ +b +a\\ b 123456 -$a-\t-\\-\"-\'-\`-\--\z-\*-\?- -$a-\t-\\-\"-\'-\`-\--\z-\*-\?- @@ -20,6 +26,8 @@ c\ Unquoted -heredoc: a b +a\ +b 123456 -qwerty-\t-\-\"-\'-`-\--\z-\*-\?- -qwerty-\t-\-\"-\'-`-\--\z-\*-\?- cEOF4 diff --git a/shell/hush_test/hush-misc/heredoc_backslash1.tests b/shell/hush_test/hush-misc/heredoc_backslash1.tests index b70467df8..22045d42e 100755 --- a/shell/hush_test/hush-misc/heredoc_backslash1.tests +++ b/shell/hush_test/hush-misc/heredoc_backslash1.tests @@ -7,6 +7,8 @@ echo Quoted heredoc: cat <<"EOF1" a\ b +a\\ + b 123456 -$a-\t-\\-\"-\'-\`-\--\z-\*-\?- -$a-\t-\\-\"-\'-\`-\--\z-\*-\?- c\ @@ -17,6 +19,8 @@ echo Unquoted heredoc: cat <