summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac1
-rw-r--r--tests/Makefile.am7
-rw-r--r--tests/equiv-classes12
3 files changed, 20 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 01ae0f25..481ce868 100644
--- a/configure.ac
+++ b/configure.ac
@@ -151,6 +151,7 @@ dnl Some installers want to be informed if we do not use our regex.
dnl For example, if the host platform uses dynamic linking and the installer
dnl knows that the grep may be invoked on other hosts with buggy libraries,
dnl then the installer should configure --with-included-regex.
+AM_CONDITIONAL([USE_INCLUDED_REGEX], [test "$ac_use_included_regex" = yes])
if test "$ac_use_included_regex" = no; then
AC_MSG_WARN([Included lib/regex.c not used])
fi
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 13e549d1..f66543f1 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -27,6 +27,12 @@ XFAIL_TESTS = \
word-delim-multibyte \
grep-dir
+# Equivalence classes are only supported when using the system
+# matcher (which means only with glibc).
+if USE_INCLUDED_REGEX
+XFAIL_TESTS += equiv-classes
+endif
+
TESTS = \
backref \
backref-word \
@@ -41,6 +47,7 @@ TESTS = \
dfaexec-multibyte \
empty \
ere \
+ equiv-classes \
euc-mb \
fedora \
fgrep-infloop \
diff --git a/tests/equiv-classes b/tests/equiv-classes
new file mode 100644
index 00000000..de38d95c
--- /dev/null
+++ b/tests/equiv-classes
@@ -0,0 +1,12 @@
+#!/bin/sh
+# Test that equivalence classes work.
+
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+
+require_en_utf8_locale_
+
+LC_ALL=en_US.UTF-8
+export LC_ALL
+
+echo à | grep '[[=a=]]' > /dev/null
+Exit $?