-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix command substitutions run on the same line as a here-doc (#91)
When a command substitution is run on the same line as a here-document, a syntax error occurs due to a regression introduced in ksh93u+ 2011-04-15: true << EOF; true $(true) EOF syntax error at line 1: `<<EOF' here-document not contained within command substitution The regression is caused by an error check that was added to make the following script causes a syntax error (because the here-document isn't completed inside of the command substitution): $(true << EOF) EOF src/cmd/ksh93/sh/lex.c: - Only throw an error when a here-document in a command substitution isn't completed inside of the command substitution. src/cmd/ksh93/tests/heredoc.sh: - Add a regression test for running a command substitution on the same line as a here-document. - Add a missed regression test for using here-documents in command substitutions. This is the original bug that was fixed in ksh93u+ 2011-04-15 (it is why the error message was added), but a regression test for here-documents in command substitutions wasn't added in that version. This bugfix was backported from ksh93v- 2013-10-10-alpha.
- Loading branch information
Showing
4 changed files
with
20 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,4 @@ | |
* David Korn <[email protected]> * | ||
* * | ||
***********************************************************************/ | ||
#define SH_RELEASE "93u+m 2020-07-22" | ||
#define SH_RELEASE "93u+m 2020-07-23" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters