aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shell/ash.c6
-rw-r--r--shell/ash_test/ash-heredoc/heredoc_backquote1.right5
-rwxr-xr-xshell/ash_test/ash-heredoc/heredoc_backquote1.tests10
-rw-r--r--shell/hush_test/hush-heredoc/heredoc_backquote1.right5
-rwxr-xr-xshell/hush_test/hush-heredoc/heredoc_backquote1.tests10
5 files changed, 36 insertions, 0 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 454bc3317..cf1d062fb 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -12093,6 +12093,12 @@ readtoken1(int c, int syntax, char *eofmark, int striptabs)
12093 break; 12093 break;
12094#endif 12094#endif
12095 case CBQUOTE: /* '`' */ 12095 case CBQUOTE: /* '`' */
12096 if (checkkwd & CHKEOFMARK) {
12097 quotef = 1;
12098 USTPUTC('`', out);
12099 break;
12100 }
12101
12096 PARSEBACKQOLD(); 12102 PARSEBACKQOLD();
12097 break; 12103 break;
12098 case CENDFILE: 12104 case CENDFILE:
diff --git a/shell/ash_test/ash-heredoc/heredoc_backquote1.right b/shell/ash_test/ash-heredoc/heredoc_backquote1.right
new file mode 100644
index 000000000..0be2a3296
--- /dev/null
+++ b/shell/ash_test/ash-heredoc/heredoc_backquote1.right
@@ -0,0 +1,5 @@
1heredoc1
2Ok1:0
3heredoc2
4EO`false`F
5Ok2:0
diff --git a/shell/ash_test/ash-heredoc/heredoc_backquote1.tests b/shell/ash_test/ash-heredoc/heredoc_backquote1.tests
new file mode 100755
index 000000000..ec3d8fe1d
--- /dev/null
+++ b/shell/ash_test/ash-heredoc/heredoc_backquote1.tests
@@ -0,0 +1,10 @@
1cat <<EO`true`F
2heredoc1
3EO`true`F
4echo Ok1:$?
5
6cat <<EO`true`F
7heredoc2
8EO`false`F
9EO`true`F
10echo Ok2:$?
diff --git a/shell/hush_test/hush-heredoc/heredoc_backquote1.right b/shell/hush_test/hush-heredoc/heredoc_backquote1.right
new file mode 100644
index 000000000..0be2a3296
--- /dev/null
+++ b/shell/hush_test/hush-heredoc/heredoc_backquote1.right
@@ -0,0 +1,5 @@
1heredoc1
2Ok1:0
3heredoc2
4EO`false`F
5Ok2:0
diff --git a/shell/hush_test/hush-heredoc/heredoc_backquote1.tests b/shell/hush_test/hush-heredoc/heredoc_backquote1.tests
new file mode 100755
index 000000000..ec3d8fe1d
--- /dev/null
+++ b/shell/hush_test/hush-heredoc/heredoc_backquote1.tests
@@ -0,0 +1,10 @@
1cat <<EO`true`F
2heredoc1
3EO`true`F
4echo Ok1:$?
5
6cat <<EO`true`F
7heredoc2
8EO`false`F
9EO`true`F
10echo Ok2:$?