aboutsummaryrefslogtreecommitdiff
path: root/shell/ash_test/ash-heredoc (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ash: [PARSER] Recognise here-doc delimiters terminated by EOFDenys Vlasenko2016-10-264-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upstream commit 1: Date: Wed, 26 Sep 2007 17:14:16 +0800 [PARSER] Recognise here-doc delimiters terminated by EOF Previously dash required a <newline> character to be present in order for a here-document delimiter to be detected. Allowing EOF in the absence of a <newline> to play the same purpose allows some intuitive scripts to succeed. POSIX seems to be silence on this so this should be OK. Test case: eval 'cat <<- NOT test NOT' echo OK Old result: test NOTOK New result: test OK Upstream commit 2: Date: Sat, 20 Oct 2007 18:49:31 +0800 [PARSER] Fix here-doc corruption The change [PARSER] Recognise here-doc delimiters terminated by EOF introduced a regerssion whereby lines starting with eofmark but are not equal to eofmark would be corrupted. This patch fixes it. Test case: cat << _ACEOF _ASBOX _ACEOF Old result: SASBOX New result: _ASBOX Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash testsuite: add most of hust tests which pass for ashDenys Vlasenko2016-10-032-0/+12
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* sh testsuite: create hush-heredoc/* and move files aroundDenys Vlasenko2016-10-022-0/+21
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: bash-compatible $'...' shouldn't expand in double quotesRon Yorston2016-04-152-0/+4
| | | | | | | | | | | | | | | | | | | Bash doesn't expand its $'...' construct in double quotes: $ echo "$'a\tb'" $'a\tb' Change BusyBox ash to do the same. This also fixes a problem with here documents where BusyBox ash gave an incorrect result for: $ cat <<EOF > '$' > EOF '$' Reported-by: Timo Teras <timo.teras@iki.fi> Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: fix error during recursive processing of here documentRon Yorston2015-10-292-0/+10
| | | | | | | | | | | | | | | | Save the value of the checkkwd flag to prevent it being clobbered during recursion. Based on commit ec2c84d from git://git.kernel.org/pub/scm/utils/dash/dash.git by Herbert Xu. function old new delta readtoken 190 203 +13 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/0 up/down: 13/0) Total: 13 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: add test for issue with here documentRon Yorston2015-10-292-0/+9
| | | | | | | | | | | | | | | | This used to work but doesn't now: foo () { cat <<EOF && { echo "$1" ; } $1 EOF } foo "bar" Reported-by: Natanael Copa <ncopa@alpinelinux.org> Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: fix handling of duplicate "local"Denys Vlasenko2015-04-181-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: fix a SEGV case in an invalid heredocDenys Vlasenko2015-02-052-0/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* fix accumulated whitespace and indentation damageDenis Vlasenko2007-03-201-1/+1
|
* ash: "here document" testcasesDenis Vlasenko2007-03-052-0/+115