bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 2/2] tests: add testcase for previous change


From: Paolo Bonzini
Subject: [PATCH 2/2] tests: add testcase for previous change
Date: Fri, 5 Jul 2013 13:28:24 +0200

* tests/Makefile.am (TESTS): add char-class-multibyte2.
* tests/char-class-multibyte2: New file.
---
 tests/Makefile.am           |  1 +
 tests/char-class-multibyte2 | 17 +++++++++++++++++
 2 files changed, 18 insertions(+)
 create mode 100755 tests/char-class-multibyte2

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 1c6b10c..c96ce06 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -46,6 +46,7 @@ TESTS =                                               \
   case-fold-char-range                         \
   case-fold-char-type                          \
   char-class-multibyte                         \
+  char-class-multibyte2                                \
   dfa-coverage                                 \
   dfa-heap-overrun                             \
   dfaexec-multibyte                            \
diff --git a/tests/char-class-multibyte2 b/tests/char-class-multibyte2
new file mode 100755
index 0000000..a4bcc18
--- /dev/null
+++ b/tests/char-class-multibyte2
@@ -0,0 +1,17 @@
+#!/bin/sh
+# This test would segfault for grep-2.14
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+
+require_en_utf8_locale_
+require_compiled_in_MB_support
+
+printf 'é\n'      > exp1 || framework_failure_
+fail=0
+
+for LOC in en_US.UTF-8 $LOCALE_FR_UTF8; do
+  out=out4-$LOC
+  printf 'á\nç\né\n' | LC_ALL=$LOC grep -E '([^.]*[é]){1,2}' > $out || fail=1
+  compare exp1 $out || fail=1
+done
+
+Exit $fail
-- 
1.8.2.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]