diff options
-rw-r--r-- | shell/ash.c | 2 | ||||
-rw-r--r-- | shell/ash_test/ash-heredoc/heredoc4.right | 1 | ||||
-rwxr-xr-x | shell/ash_test/ash-heredoc/heredoc4.tests | 3 | ||||
-rw-r--r-- | shell/ash_test/ash-quoting/dollar_squote_bash1.right | 1 | ||||
-rwxr-xr-x | shell/ash_test/ash-quoting/dollar_squote_bash1.tests | 1 |
5 files changed, 7 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c index 13eeab34b..da9c95045 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -11500,7 +11500,7 @@ parsesub: { | |||
11500 | || (c != '(' && c != '{' && !is_name(c) && !is_special(c)) | 11500 | || (c != '(' && c != '{' && !is_name(c) && !is_special(c)) |
11501 | ) { | 11501 | ) { |
11502 | #if ENABLE_ASH_BASH_COMPAT | 11502 | #if ENABLE_ASH_BASH_COMPAT |
11503 | if (c == '\'') | 11503 | if (syntax != DQSYNTAX && c == '\'') |
11504 | bash_dollar_squote = 1; | 11504 | bash_dollar_squote = 1; |
11505 | else | 11505 | else |
11506 | #endif | 11506 | #endif |
diff --git a/shell/ash_test/ash-heredoc/heredoc4.right b/shell/ash_test/ash-heredoc/heredoc4.right new file mode 100644 index 000000000..371b092e2 --- /dev/null +++ b/shell/ash_test/ash-heredoc/heredoc4.right | |||
@@ -0,0 +1 @@ | |||
'$' | |||
diff --git a/shell/ash_test/ash-heredoc/heredoc4.tests b/shell/ash_test/ash-heredoc/heredoc4.tests new file mode 100755 index 000000000..642ddb324 --- /dev/null +++ b/shell/ash_test/ash-heredoc/heredoc4.tests | |||
@@ -0,0 +1,3 @@ | |||
1 | cat <<EOF | ||
2 | '$' | ||
3 | EOF | ||
diff --git a/shell/ash_test/ash-quoting/dollar_squote_bash1.right b/shell/ash_test/ash-quoting/dollar_squote_bash1.right index 57536b1d9..9f4e25efa 100644 --- a/shell/ash_test/ash-quoting/dollar_squote_bash1.right +++ b/shell/ash_test/ash-quoting/dollar_squote_bash1.right | |||
@@ -1,4 +1,5 @@ | |||
1 | a b | 1 | a b |
2 | $'a\tb' | ||
2 | a | 3 | a |
3 | b c | 4 | b c |
4 | def | 5 | def |
diff --git a/shell/ash_test/ash-quoting/dollar_squote_bash1.tests b/shell/ash_test/ash-quoting/dollar_squote_bash1.tests index 93a56cac3..6fc411b93 100755 --- a/shell/ash_test/ash-quoting/dollar_squote_bash1.tests +++ b/shell/ash_test/ash-quoting/dollar_squote_bash1.tests | |||
@@ -1,4 +1,5 @@ | |||
1 | echo $'a\tb' | 1 | echo $'a\tb' |
2 | echo "$'a\tb'" | ||
2 | echo $'a\nb' $'c\nd''ef' | 3 | echo $'a\nb' $'c\nd''ef' |
3 | echo $'a\'b' $'c\"d' $'e\\f' | 4 | echo $'a\'b' $'c\"d' $'e\\f' |
4 | echo $'a\63b' $'c\063b' $'e\0633f' | 5 | echo $'a\63b' $'c\063b' $'e\0633f' |