<feed xmlns='http://www.w3.org/2005/Atom'>
<title>busybox-w32/shell/ash_test/ash-heredoc/heredoc6.tests, branch zstd</title>
<subtitle>A mirror of https://github.com/rmyorston/busybox-w32.git
</subtitle>
<id>https://git.lua4.win/busybox-w32/atom?h=zstd</id>
<link rel='self' href='https://git.lua4.win/busybox-w32/atom?h=zstd'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/'/>
<updated>2016-10-26T14:26:45+00:00</updated>
<entry>
<title>ash: [PARSER] Recognise here-doc delimiters terminated by EOF</title>
<updated>2016-10-26T14:26:45+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2016-10-26T14:26:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=350e686f3b04f41f623316706094f0e18a10c1cf'/>
<id>urn:sha1:350e686f3b04f41f623316706094f0e18a10c1cf</id>
<content type='text'>
Upstream commit 1:

    Date: Wed, 26 Sep 2007 17:14:16 +0800
    [PARSER] Recognise here-doc delimiters terminated by EOF

    Previously dash required a &lt;newline&gt; character to be present in order for
    a here-document delimiter to be detected.  Allowing EOF in the absence of
    a &lt;newline&gt; 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 &lt;&lt;- 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 &lt;&lt; _ACEOF
        _ASBOX
        _ACEOF

    Old result:

        SASBOX

    New result:

        _ASBOX

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
</feed>
