bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [patch #4604] Fix left anchors and -w problems


From: Julian Foad
Subject: Re: [patch #4604] Fix left anchors and -w problems
Date: Wed, 09 Nov 2005 15:50:33 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050511

Charles Levert wrote:
 <http://savannah.gnu.org/patch/?func=detailitem&item_id=4604>
 <http://savannah.gnu.org/patch/download.php?item_id=4604&item_file_id=5449>

The following set of changes make previously failing tests relative to left
anchors (^ and \<) and -w pass.

Excellent.

It should address the issues raised in bug #11579 and patch #1834.

Yes, I confirm it does.

It now makes fmbtest.sh Test #6 (G and E) fail, but isn't it that test that
has wrong expectations?  (Test that -{G,E} --color=always prefers earlier
pattern matches.  Earlier as in -e/-f order.)

As far as I can see, the test matches its description, and your log message says that your code is intended to do that (prefer matches with earlier patterns), but grep in fact colours text that matches a later pattern. This indicates a bug.

Did you have anything in particular in mind when you asked "isn't it that test that has wrong expectations?"? As far as I can see, that test's expectation matches your description of your patch.


Other than that, my only comment is please could you put a doc string on the typedef or #define for the "execute" functions that states, at the very least, the special meaning of "start_pos == -1". And/or use a defined constant with a suitable name instead of the "(size_t) -1". Thanks.

- Julian





reply via email to

[Prev in Thread] Current Thread [Next in Thread]