summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaolo Bonzini <bonzini@gnu.org>2010-03-17 09:36:37 +0100
committerPaolo Bonzini <bonzini@gnu.org>2010-03-17 09:42:14 +0100
commit12043754720f27863e73e491a050018b75dc754b (patch)
tree2117b86a9fd2750fb37b69d39d170b01406d8144 /tests
parent70e236167c3973fc428d2b5b297218fde9b68e73 (diff)
downloadgrep-12043754720f27863e73e491a050018b75dc754b.tar.gz
tests: add another grep -i testcase, from bug 16179
* tests/case-fold-backref: New. * tests/Makefile.am (TESTS): Add it.
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am1
-rw-r--r--tests/case-fold-backref14
2 files changed, 15 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index e27d1d5d..38b8db15 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -17,6 +17,7 @@
TESTS = \
backref.sh \
bre.sh \
+ case-fold-backref \
case-fold-backslash-w \
case-fold-char-class \
case-fold-char-range \
diff --git a/tests/case-fold-backref b/tests/case-fold-backref
new file mode 100644
index 00000000..01a2f1fe
--- /dev/null
+++ b/tests/case-fold-backref
@@ -0,0 +1,14 @@
+#!/bin/sh
+# This would fail for grep-2.5.3
+: ${srcdir=.}
+. "$srcdir/init.sh"; path_prepend_ ../src
+
+printf 'the the\nThe the\nTHE the\n' > exp1 || framework_failure
+fail=0
+
+for LOC in en_US.UTF-8 en_US zh_CN $LOCALE_FR_UTF8 C; do
+ LC_ALL=$LOC grep -Ei '(the) \1' exp1 > out1 || fail=1
+ compare out1 exp1 || fail=1
+done
+
+Exit $fail