bug-grep
[Top][All Lists]
Advanced

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

Question about "-m1 -A99" tests in foad1.sh


From: Charles Levert
Subject: Question about "-m1 -A99" tests in foad1.sh
Date: Thu, 3 Nov 2005 07:04:54 -0500
User-agent: Mutt/1.4.1i

I have a question about the following tests:

=================================================
# Test combination of "-m" with "-A" and anchors.
# Based on a report from Pavol Gono.
grep_test "4/40/"  "4/40/"  "^4$" -m1 -A99
grep_test "4/04/"  "4/04/"  "^4$" -m1 -A99
grep_test "4/444/" "4/444/" "^4$" -m1 -A99
grep_test "4/40/"  "4/40/"  "^4"  -m1 -A99
grep_test "4/04/"  "4/04/"  "^4"  -m1 -A99
grep_test "4/444/" "4/444/" "^4"  -m1 -A99
grep_test "4/40/"  "4/40/"  "4$"  -m1 -A99
grep_test "4/04/"  "4/04/"  "4$"  -m1 -A99
grep_test "4/444/" "4/444/" "4$"  -m1 -A99
=================================================

As I understand the intent, the second line of
input should be printed whether it would match or
not, solely because it is part of the specified
number of context lines.

However, if other options such as
--with-filename, --line-number, --byte-offset,
and/or --color=always are used, and if any
line that is part of the after-context would
also have matched on its own given the chance,
should it be marked as matching or not?  I.e.,
what separator should be used for such a line
(':' or '-') and how should it be colorized?




reply via email to

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