summaryrefslogtreecommitdiff
path: root/tests/init.cfg
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2011-05-21 12:13:08 +0200
committerJim Meyering <meyering@redhat.com>2011-05-21 12:13:08 +0200
commit2be2b8c044f8bd0fc6723004840029bd85078196 (patch)
tree959b2ff53d265f8b2a41cbe0d1bc8d66f21e8ade /tests/init.cfg
parent8e6d2371460706b0ad48ee476fb5cde7f4cd61ee (diff)
downloadgrep-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.cfg6
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_()