[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] tests: add another grep -i testcase, from bug 16179
From: |
Paolo Bonzini |
Subject: |
[PATCH] tests: add another grep -i testcase, from bug 16179 |
Date: |
Wed, 17 Mar 2010 09:46:04 +0100 |
* tests/case-fold-backref: New.
* tests/Makefile.am (TESTS): Add it.
---
tests/Makefile.am | 1 +
tests/case-fold-backref | 14 ++++++++++++++
2 files changed, 15 insertions(+), 0 deletions(-)
create mode 100644 tests/case-fold-backref
diff --git a/tests/Makefile.am b/tests/Makefile.am
index e27d1d5..38b8db1 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 0000000..01a2f1f
--- /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
--
1.6.6.1
- [PATCH] tests: add another grep -i testcase, from bug 16179,
Paolo Bonzini <=