[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
grep branch, master, updated. v3.5-2-g2f3ec21
From: |
Jim Meyering |
Subject: |
grep branch, master, updated. v3.5-2-g2f3ec21 |
Date: |
Tue, 29 Sep 2020 01:10:06 -0400 (EDT) |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".
The branch, master has been updated
via 2f3ec21c25021355bd19ea3965b61607a0bdf83e (commit)
from 111b8b59273d14afee2386611d5e10e22e507864 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=2f3ec21c25021355bd19ea3965b61607a0bdf83e
commit 2f3ec21c25021355bd19ea3965b61607a0bdf83e
Author: Jim Meyering <meyering@fb.com>
Date: Sun Sep 27 22:23:00 2020 -0700
tests: restore deleted -P tests
v3.4-almost-45-g8577dda deleted these two -P-using tests because a
grep built without PCRE support would fail those tests. This sets
an envvar with the equivalent of the result from the require_pcre_
function and restores the now-guarded tests. Tested by running this:
./configure --disable-perl-regexp && make check
* tests/Makefile.am (PCRE_WORKS): Set this envvar.
* tests/filename-lineno.pl: Restore invalid-re-P-paren and
invalid-re-P-star-paren, now each with a guard.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 83e7087..034bd0c 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -224,6 +224,11 @@ TESTS_ENVIRONMENT = \
}; \
fi; \
\
+ : 'set this envvar to indicate whether -P works'; \
+ m=0; if err=`echo .|grep -Pq . 2>&1`; then \
+ test -z "$$err" && m=1; fi; \
+ export PCRE_WORKS=$$m; \
+ \
: 'Test egrep/fgrep help if they use our grep.'; \
grep=`echo grep | sed -e '$(transform)'` || exit; \
if test "$$grep" = grep; then \
diff --git a/tests/filename-lineno.pl b/tests/filename-lineno.pl
index be927ef..82b48cd 100755
--- a/tests/filename-lineno.pl
+++ b/tests/filename-lineno.pl
@@ -97,6 +97,19 @@ my @Tests =
['invalid-re-G-star-paren', '-G "a.*\\)"', {EXIT=>2},
{ERR => "$prog: Unmatched ) or \\)\n"},
],
+ ['invalid-re-P-paren', '-P ")"', {EXIT=>2},
+ {ERR => $ENV{PCRE_WORKS} == 1
+ ? "$prog: unmatched parentheses\n"
+ : "Perl matching not supported in a --disable-perl-regexp build\n"
+ },
+ ],
+ ['invalid-re-P-star-paren', '-P "a.*)"', {EXIT=>2},
+ {ERR => $ENV{PCRE_WORKS} == 1
+ ? "$prog: unmatched parentheses\n"
+ : "Perl matching not supported in a --disable-perl-regexp build\n"
+ },
+ ],
+
);
my $save_temps = $ENV{DEBUG};
-----------------------------------------------------------------------
Summary of changes:
tests/Makefile.am | 5 +++++
tests/filename-lineno.pl | 13 +++++++++++++
2 files changed, 18 insertions(+)
hooks/post-receive
--
grep
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- grep branch, master, updated. v3.5-2-g2f3ec21,
Jim Meyering <=