aboutsummaryrefslogtreecommitdiff
path: root/shell/hush_test
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2010-09-06 11:46:03 +0200
committerDenys Vlasenko <dvlasenk@redhat.com>2010-09-06 11:46:03 +0200
commitc3adfacd229dd94b1ee4800fb364d514eef4aca5 (patch)
tree1245cc6f1915bfe6af65fd152962fff889fda78d /shell/hush_test
parent77b32ccbf2a1a77911b486b673008a4cb82bb8b7 (diff)
downloadbusybox-w32-c3adfacd229dd94b1ee4800fb364d514eef4aca5.tar.gz
busybox-w32-c3adfacd229dd94b1ee4800fb364d514eef4aca5.tar.bz2
busybox-w32-c3adfacd229dd94b1ee4800fb364d514eef4aca5.zip
hush: fix another corner case with backslashes in heredocs
function old new delta parse_stream 2395 2432 +37 Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'shell/hush_test')
-rw-r--r--shell/hush_test/hush-misc/heredoc_backslash1.right8
-rwxr-xr-xshell/hush_test/hush-misc/heredoc_backslash1.tests8
2 files changed, 16 insertions, 0 deletions
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,12 +1,16 @@
1Quoted heredoc: 1Quoted heredoc:
2a\ 2a\
3 b 3 b
4a\\
5 b
4 123456 -$a-\t-\\-\"-\'-\`-\--\z-\*-\?- 6 123456 -$a-\t-\\-\"-\'-\`-\--\z-\*-\?-
5 -$a-\t-\\-\"-\'-\`-\--\z-\*-\?- 7 -$a-\t-\\-\"-\'-\`-\--\z-\*-\?-
6c\ 8c\
7 9
8Unquoted heredoc: 10Unquoted heredoc:
9a b 11a b
12a\
13 b
10 123456 -qwerty-\t-\-\"-\'-`-\--\z-\*-\?- 14 123456 -qwerty-\t-\-\"-\'-`-\--\z-\*-\?-
11 -qwerty-\t-\-\"-\'-`-\--\z-\*-\?- 15 -qwerty-\t-\-\"-\'-`-\--\z-\*-\?-
12cEOF2 16cEOF2
@@ -14,12 +18,16 @@ cEOF2
14Quoted -heredoc: 18Quoted -heredoc:
15a\ 19a\
16b 20b
21a\\
22b
17 123456 -$a-\t-\\-\"-\'-\`-\--\z-\*-\?- 23 123456 -$a-\t-\\-\"-\'-\`-\--\z-\*-\?-
18-$a-\t-\\-\"-\'-\`-\--\z-\*-\?- 24-$a-\t-\\-\"-\'-\`-\--\z-\*-\?-
19c\ 25c\
20 26
21Unquoted -heredoc: 27Unquoted -heredoc:
22a b 28a b
29a\
30b
23 123456 -qwerty-\t-\-\"-\'-`-\--\z-\*-\?- 31 123456 -qwerty-\t-\-\"-\'-`-\--\z-\*-\?-
24-qwerty-\t-\-\"-\'-`-\--\z-\*-\?- 32-qwerty-\t-\-\"-\'-`-\--\z-\*-\?-
25cEOF4 33cEOF4
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:
7cat <<"EOF1" 7cat <<"EOF1"
8a\ 8a\
9 b 9 b
10a\\
11 b
10 123456 -$a-\t-\\-\"-\'-\`-\--\z-\*-\?- 12 123456 -$a-\t-\\-\"-\'-\`-\--\z-\*-\?-
11 -$a-\t-\\-\"-\'-\`-\--\z-\*-\?- 13 -$a-\t-\\-\"-\'-\`-\--\z-\*-\?-
12c\ 14c\
@@ -17,6 +19,8 @@ echo Unquoted heredoc:
17cat <<EOF2 19cat <<EOF2
18a\ 20a\
19 b 21 b
22a\\
23 b
20 123456 -$a-\t-\\-\"-\'-\`-\--\z-\*-\?- 24 123456 -$a-\t-\\-\"-\'-\`-\--\z-\*-\?-
21 -$a-\t-\\-\"-\'-\`-\--\z-\*-\?- 25 -$a-\t-\\-\"-\'-\`-\--\z-\*-\?-
22c\ 26c\
@@ -28,6 +32,8 @@ echo Quoted -heredoc:
28cat <<-"EOF3" 32cat <<-"EOF3"
29a\ 33a\
30 b 34 b
35a\\
36 b
31 123456 -$a-\t-\\-\"-\'-\`-\--\z-\*-\?- 37 123456 -$a-\t-\\-\"-\'-\`-\--\z-\*-\?-
32 -$a-\t-\\-\"-\'-\`-\--\z-\*-\?- 38 -$a-\t-\\-\"-\'-\`-\--\z-\*-\?-
33c\ 39c\
@@ -39,6 +45,8 @@ echo Unquoted -heredoc:
39cat <<-EOF4 45cat <<-EOF4
40a\ 46a\
41 b 47 b
48a\\
49 b
42 123456 -$a-\t-\\-\"-\'-\`-\--\z-\*-\?- 50 123456 -$a-\t-\\-\"-\'-\`-\--\z-\*-\?-
43 -$a-\t-\\-\"-\'-\`-\--\z-\*-\?- 51 -$a-\t-\\-\"-\'-\`-\--\z-\*-\?-
44c\ 52c\