<feed xmlns='http://www.w3.org/2005/Atom'>
<title>busybox-w32/testsuite/grep.tests, branch long_paths</title>
<subtitle>A mirror of https://github.com/rmyorston/busybox-w32.git
</subtitle>
<id>https://git.lua4.win/busybox-w32/atom?h=long_paths</id>
<link rel='self' href='https://git.lua4.win/busybox-w32/atom?h=long_paths'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/'/>
<updated>2020-08-14T22:39:30+00:00</updated>
<entry>
<title>grep: for -L, exitcode 0 means files *without* matches were found, closes 13151</title>
<updated>2020-08-14T22:39:30+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2020-08-14T22:39:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=a77f3ecf68c63081934f5e0800eab80b5098bb24'/>
<id>urn:sha1:a77f3ecf68c63081934f5e0800eab80b5098bb24</id>
<content type='text'>
This is a recent change in GNU grep as well (after 3.1)

function                                             old     new   delta
grep_file                                           1215    1228     +13

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>grep: add proper support for pattern_list</title>
<updated>2020-04-29T22:20:18+00:00</updated>
<author>
<name>Sören Tempel</name>
<email>soeren+git@soeren-tempel.net</email>
</author>
<published>2020-03-30T09:02:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=42a8984abc5eed709addac263aab43d64d47257d'/>
<id>urn:sha1:42a8984abc5eed709addac263aab43d64d47257d</id>
<content type='text'>
From POSIX.1-2008:

	The pattern_list's value shall consist of one or more patterns
	separated by &lt;newline&gt; characters;

As such, given patterns need to be split at newline characters. Without
doing so, busybox grep will interpret the newline as part of the pattern
which is not in accordance with POSIX.

See also: https://bugs.busybox.net/show_bug.cgi?id=12721

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>grep: Fix -f FILE when FILE is empty and -x provided</title>
<updated>2020-04-29T14:01:42+00:00</updated>
<author>
<name>Gray Wolf</name>
<email>wolf@wolfsden.cz</email>
</author>
<published>2020-04-29T13:49:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=c3295d233b6a7d924814eec9a5c5999a876daf9e'/>
<id>urn:sha1:c3295d233b6a7d924814eec9a5c5999a876daf9e</id>
<content type='text'>
Grep currently special-cased empty pattern file to be the same as
pattern file with one empty line (empty pattern). That does mirror how
GNU grep behaves, except when -x is provided. In that case .* pattern
needs to be used instead.

Signed-off-by: Gray Wolf &lt;wolf@wolfsden.cz&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>grep: fix -x -v with certain pattern orders</title>
<updated>2019-01-29T13:42:57+00:00</updated>
<author>
<name>Ari Sundholm</name>
<email>ari@tuxera.com</email>
</author>
<published>2019-01-29T13:42:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=9a9c6e39ba4c8f4f2cecb147c7e6464bec2d8b55'/>
<id>urn:sha1:9a9c6e39ba4c8f4f2cecb147c7e6464bec2d8b55</id>
<content type='text'>
We found out that busybox -x -v is a bit broken:

ari@ari-thinkpad:~/busybox$ echo '  aa bb cc' | ./busybox grep -x -e 'aa.*' -e '.*bb.*'
  aa bb cc
ari@ari-thinkpad:~/busybox$ echo '  aa bb cc' | ./busybox grep -x -v -e 'aa.*' -e '.*bb.*'
ari@ari-thinkpad:~/busybox$ echo '  aa bb cc' | ./busybox grep -x -e '.*aa.*' -e 'bb.*'
  aa bb cc
ari@ari-thinkpad:~/busybox$ echo '  aa bb cc' | ./busybox grep -x -v -e '.*aa.*' -e 'bb.*'
  aa bb cc

Last one is wrong.

This patch fixes the issue by making sure that the variable 'found'
never makes a transition from 1 to 0, as this would mean that
grep previously found a match on this input line.

Signed-off-by: Ari Sundholm &lt;ari@tuxera.com&gt;
Signed-off-by: Niko Vähäsarja &lt;niko@tuxera.com&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>testsuite: allow tests to work in paths containing spaces</title>
<updated>2018-04-09T18:35:48+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2018-02-09T09:52:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=1f27fa98380c134cd0f5f03b4cd3dfe2e83c09b7'/>
<id>urn:sha1:1f27fa98380c134cd0f5f03b4cd3dfe2e83c09b7</id>
<content type='text'>
Tweak some tests so they work when the path to the test directory or
$HOME contains spaces.

Signed-off-by: Ron Yorston &lt;rmy@pobox.com&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>grep: fix echo "aa" | busybox grep -F -w "a" (should not match)</title>
<updated>2018-03-29T16:03:50+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2018-03-29T16:03:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=03fd7e06f854d385070a6fc9714f445727c359cd'/>
<id>urn:sha1:03fd7e06f854d385070a6fc9714f445727c359cd</id>
<content type='text'>
function                                             old     new   delta
grep_file                                           1461    1470      +9

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>Make grep/egrep/fgrep independently selectable</title>
<updated>2016-11-14T04:09:48+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2016-11-14T04:09:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=1924e99ad3513990f317c4295c35d5861521555a'/>
<id>urn:sha1:1924e99ad3513990f317c4295c35d5861521555a</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>grep: fix "grep -r PATTRN SYMLINK_TO_DIR"</title>
<updated>2014-08-28T13:50:09+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2014-08-28T13:50:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=34cc6c91a286411a8275d9d61aa80397fe1e5fa3'/>
<id>urn:sha1:34cc6c91a286411a8275d9d61aa80397fe1e5fa3</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>grep: fix -w match if first match isn't a word, but second is. Closes 4520</title>
<updated>2014-02-27T13:56:12+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2014-02-27T13:56:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=83e49ade5724f5b3744660e45179461fe2a1b0f8'/>
<id>urn:sha1:83e49ade5724f5b3744660e45179461fe2a1b0f8</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>grep: properly handle grep -w "^str" in !EXTRA_COMPAT case too</title>
<updated>2014-02-07T16:15:56+00:00</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bartekgola@gmail.com</email>
</author>
<published>2014-02-07T16:14:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=3ba2df874ca27f075a0897210d8dce6c56646e60'/>
<id>urn:sha1:3ba2df874ca27f075a0897210d8dce6c56646e60</id>
<content type='text'>
function                                             old     new   delta
grep_file                                           1267    1288     +21

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