<feed xmlns='http://www.w3.org/2005/Atom'>
<title>busybox-w32/shell/ash_test/ash-heredoc, branch realpath</title>
<subtitle>A mirror of https://github.com/rmyorston/busybox-w32.git
</subtitle>
<id>https://git.lua4.win/busybox-w32/atom?h=realpath</id>
<link rel='self' href='https://git.lua4.win/busybox-w32/atom?h=realpath'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/'/>
<updated>2018-04-02T11:29:20+00:00</updated>
<entry>
<title>ash: parser: Fix single-quoted patterns in here-documents</title>
<updated>2018-04-02T11:29:20+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2018-04-02T11:29:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=c4c2012284c3a3a45843e9400379c84855d853ef'/>
<id>urn:sha1:c4c2012284c3a3a45843e9400379c84855d853ef</id>
<content type='text'>
Upstream commit:

    From: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
    Date: Fri, 9 Mar 2018 23:07:53 +0800
    parser: Fix single-quoted patterns in here-documents

    The script

            x=*
            cat &lt;&lt;- EOF
                    ${x#'*'}
            EOF

    prints * instead of nothing as it should.  The problem is that
    when we're in sqsyntax context in a here-document, we won't add
    CTLESC as we should.  This patch fixes it:

    Reported-by: Harald van Dijk &lt;harald@gigawatt.nl&gt;
    Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>parser: Fix backquote support in here-document EOF mark</title>
<updated>2018-04-01T14:38:32+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2018-04-01T14:38:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=41fddb43729373740bfba82da83373ec5ba49fc8'/>
<id>urn:sha1:41fddb43729373740bfba82da83373ec5ba49fc8</id>
<content type='text'>
Upstream commit:

    Author: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
    Date:   Thu Mar 15 18:27:30 2018 +0800
    parser: Fix backquote support in here-document EOF mark

    Currently using backquotes in a here-document EOF mark is broken
    because dash tries to do command substitution on it.  This patch
    fixes it by checking whether we're looking for an EOF mark during
    tokenisation.

    Reported-by: Harald van Dijk &lt;harald@gigawatt.nl&gt;
    Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;

With added fix for quoted-ness of the EOF mark.

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>ash: use pgetc_eatbnl() in more places</title>
<updated>2018-03-31T17:40:56+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2018-03-31T17:21:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=220be537a03f029e1e619003d6f7def10103a156'/>
<id>urn:sha1:220be537a03f029e1e619003d6f7def10103a156</id>
<content type='text'>
Part of upstream commit:

    Date:   Thu Mar 8 08:37:11 2018 +0100
    Author: Harald van Dijk &lt;harald@gigawatt.nl&gt;
    parser: use pgetc_eatbnl() in more places

    dash has a pgetc_eatbnl function in parser.c which skips any
    backslash-newline combinations. It's not used everywhere it could be.
    There is also some duplicated backslash-newline handling elsewhere in
    parser.c. Replace most of the calls to pgetc() with calls to
    pgetc_eatbnl() and remove the duplicated backslash-newline handling.

    Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;

Not adding "readtoken1(pgetc_eatbnl(), DQSYNTAX..." changes, since
readtoken1() handles the "starts with backslash + newline" case itself.

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>hush: fix handling of empty heredoc EOF marker</title>
<updated>2017-07-29T18:43:26+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2017-07-29T18:43:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=0f018b30700989462de0a15b8285206d16170c1f'/>
<id>urn:sha1:0f018b30700989462de0a15b8285206d16170c1f</id>
<content type='text'>
function                                             old     new   delta
parse_stream                                        2609    2634     +25

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>ash: [PARSER] Removed noexpand/length check on eofmark</title>
<updated>2017-07-29T17:57:28+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2017-07-29T17:57:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=a732898fdd9748b966da228ee8bbbc148c3c10c9'/>
<id>urn:sha1:a732898fdd9748b966da228ee8bbbc148c3c10c9</id>
<content type='text'>
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:
	&gt;
	&gt; } 8&lt;&lt;""
	&gt; ======================

	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.

	&gt; In [0] it's stated, that delimiter isn't evaluated (expanded), only
	&gt; 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 &lt;&lt;- $a
	                OK
	        $a

	        cat &lt;&lt;- ""
	                OK

	        echo OK

	Old result:

	        dash: Syntax error: Illegal eof marker for &lt;&lt; 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 &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>shell: syncronize ash and hush heredoc3.tests</title>
<updated>2017-07-06T16:19:35+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2017-07-06T16:19:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=bb963bda62cc8b0965a921df70dfea44c4378163'/>
<id>urn:sha1:bb963bda62cc8b0965a921df70dfea44c4378163</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>shell: syncronize ash and hush heredoc1.tests</title>
<updated>2017-07-06T16:16:18+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2017-07-06T16:16:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=959cb6742832a3b403a5d0116088a09f33afe927'/>
<id>urn:sha1:959cb6742832a3b403a5d0116088a09f33afe927</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<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>
<entry>
<title>ash testsuite: add most of hust tests which pass for ash</title>
<updated>2016-10-02T22:06:55+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2016-10-02T22:06:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=a62bc80571eae6d286aed9a92d47dc42318a8146'/>
<id>urn:sha1:a62bc80571eae6d286aed9a92d47dc42318a8146</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>sh testsuite: create hush-heredoc/* and move files around</title>
<updated>2016-10-02T15:49:46+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2016-10-02T15:49:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=1b73f8471a3694d2e6b035bb7f04e1f4df943f03'/>
<id>urn:sha1:1b73f8471a3694d2e6b035bb7f04e1f4df943f03</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
</feed>
