diff options
author | Jim Meyering <meyering@redhat.com> | 2011-05-21 12:13:08 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2011-05-21 12:13:08 +0200 |
commit | 2be2b8c044f8bd0fc6723004840029bd85078196 (patch) | |
tree | 959b2ff53d265f8b2a41cbe0d1bc8d66f21e8ade /tests/init.cfg | |
parent | 8e6d2371460706b0ad48ee476fb5cde7f4cd61ee (diff) | |
download | grep-2be2b8c044f8bd0fc6723004840029bd85078196.tar.gz |
tests: factor out a new require_pcre_ function
* tests/init.cfg (require_pcre_): New function, factored out of...
* tests/pcre-z: ...here. Use the function.
* tests/pcre: Likewise.
Diffstat (limited to 'tests/init.cfg')
-rw-r--r-- | tests/init.cfg | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/init.cfg b/tests/init.cfg index baa2b40f..4c9d2d33 100644 --- a/tests/init.cfg +++ b/tests/init.cfg @@ -43,6 +43,12 @@ require_timeout_() || skip_ your system lacks the timeout program } +require_pcre_() +{ + echo . | grep -P . 2>err || skip_ no PCRE support + compare err /dev/null || fail_ PCRE available, but stderr not empty. +} + # Some tests would fail without this particular locale. # If the locale is not available, just skip the test. require_en_utf8_locale_() |