busybox/shell/ash_test/ash-heredoc
Denys Vlasenko a732898fdd ash: [PARSER] Removed noexpand/length check on eofmark
Upstream comment:

	Date: Sun, 11 Nov 2007 14:21:23 +0800
	[PARSER] Removed noexpand/length check on eofmark

	On Tue, Oct 30, 2007 at 04:23:35AM +0000, Oleg Verych wrote:
	>
	> } 8<<""
	> ======================

	Actually this (the empty delim) only works with dash by accident.
	I've tried bash and pdksh and they both terminate on the first
	empty line which is what you would expect rather than EOF.  The
	real Korn shell does something completely different.

	I've fixed this in dash to conform to bash/pdksh.

	> In [0] it's stated, that delimiter isn't evaluated (expanded), only
	> quoiting must be checked. That if() seems to be completely bogus.

	OK I agree.  The reason it was there is because the parser would
	have already replaced the dollar sign by an internal representation.

	I've fixed it properly with this patch.

	Test case:

	        cat <<- $a
	                OK
	        $a

	        cat <<- ""
	                OK

	        echo OK

	Old result:

	        dash: Syntax error: Illegal eof marker for << redirection
	        OK

	        echo OK

	New result:

	        OK
	        OK
	        OK

function                                             old     new   delta
parsefname                                           227     152     -75
readtoken1                                          2819    2651    -168
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-243)           Total: -243 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-07-29 19:57:28 +02:00
..
heredoc1.right shell: syncronize ash and hush heredoc1.tests 2017-07-06 18:16:18 +02:00
heredoc1.tests shell: syncronize ash and hush heredoc1.tests 2017-07-06 18:16:18 +02:00
heredoc2.right ash: add test for issue with here document 2015-10-29 19:12:03 +01:00
heredoc2.tests ash: add test for issue with here document 2015-10-29 19:12:03 +01:00
heredoc3.right shell: syncronize ash and hush heredoc3.tests 2017-07-06 18:19:35 +02:00
heredoc3.tests shell: syncronize ash and hush heredoc3.tests 2017-07-06 18:19:35 +02:00
heredoc4.right ash: bash-compatible $'...' shouldn't expand in double quotes 2016-04-15 22:16:46 +02:00
heredoc4.tests ash: bash-compatible $'...' shouldn't expand in double quotes 2016-04-15 22:16:46 +02:00
heredoc5.right sh testsuite: create hush-heredoc/* and move files around 2016-10-02 17:49:46 +02:00
heredoc5.tests sh testsuite: create hush-heredoc/* and move files around 2016-10-02 17:49:46 +02:00
heredoc6.right ash: [PARSER] Recognise here-doc delimiters terminated by EOF 2016-10-26 16:26:45 +02:00
heredoc6.tests ash: [PARSER] Recognise here-doc delimiters terminated by EOF 2016-10-26 16:26:45 +02:00
heredoc7.right ash: [PARSER] Recognise here-doc delimiters terminated by EOF 2016-10-26 16:26:45 +02:00
heredoc7.tests ash: [PARSER] Recognise here-doc delimiters terminated by EOF 2016-10-26 16:26:45 +02:00
heredoc8.right shell: syncronize ash and hush heredoc1.tests 2017-07-06 18:16:18 +02:00
heredoc8.tests shell: syncronize ash and hush heredoc1.tests 2017-07-06 18:16:18 +02:00
heredoc9.right shell: syncronize ash and hush heredoc3.tests 2017-07-06 18:19:35 +02:00
heredoc9.tests shell: syncronize ash and hush heredoc3.tests 2017-07-06 18:19:35 +02:00
heredoc_empty.right ash: [PARSER] Removed noexpand/length check on eofmark 2017-07-29 19:57:28 +02:00
heredoc_empty.tests ash: [PARSER] Removed noexpand/length check on eofmark 2017-07-29 19:57:28 +02:00
heredoc_huge.right ash testsuite: add most of hust tests which pass for ash 2016-10-03 00:06:55 +02:00
heredoc_huge.tests ash testsuite: add most of hust tests which pass for ash 2016-10-03 00:06:55 +02:00
heredoc.right
heredoc.tests fix accumulated whitespace and indentation damage 2007-03-20 11:30:28 +00:00