grep-commit
[Top][All Lists]
Advanced

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

grep branch, master, updated. v2.14-7-g8f365f0


From: Paolo Bonzini
Subject: grep branch, master, updated. v2.14-7-g8f365f0
Date: Wed, 03 Oct 2012 09:22:26 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".

The branch, master has been updated
       via  8f365f028427e4f8f6f52e548a3a0cbf3c9e94db (commit)
       via  67436786c110bbb565f0c1b96f1ca1d4586e1c8d (commit)
      from  c1996dd3c98a81cf700ba11e1521ca3d964aeabe (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=8f365f028427e4f8f6f52e548a3a0cbf3c9e94db


commit 8f365f028427e4f8f6f52e548a3a0cbf3c9e94db
Author: Paolo Bonzini <address@hidden>
Date:   Wed Oct 3 11:19:03 2012 +0200

    tests: include UTF-8 testcases for grep -P
    
    * tests/Makefile.am (TESTS): Add pcre-utf8.
    * tests/pcre-utf8: New file.

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 58deaa2..2f99a69 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -75,6 +75,7 @@ TESTS =                                               \
   options                                      \
   pcre                                         \
   pcre-abort                                   \
+  pcre-utf8                                    \
   pcre-z                                       \
   prefix-of-multibyte                          \
   r-dot                                                \
diff --git a/tests/pcre-utf8 b/tests/pcre-utf8
new file mode 100755
index 0000000..b86b114
--- /dev/null
+++ b/tests/pcre-utf8
@@ -0,0 +1,33 @@
+#! /bin/sh
+# Ensure that, with -P, Unicode \p{} symbols are correctly matched.
+#
+# Copyright (C) 2001, 2006, 2009-2012 Free Software Foundation, Inc.
+#
+# Copying and distribution of this file, with or without modification,
+# are permitted in any medium without royalty provided the copyright
+# notice and this notice are preserved.
+
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+require_pcre_
+require_en_utf8_locale_
+
+fail=0
+
+echo '$' | LC_ALL=en_US.UTF-8 grep -qP '\p{S}' || exit 77
+
+euro='\xe2\x82\xac euro'
+printf "$euro\\n" > in || framework_failure_
+
+LC_ALL=en_US.UTF-8 grep -P '^\p{S}' in > out || fail=1
+compare out in || fail=1
+
+LC_ALL=en_US.UTF-8 grep -P '^. euro$' in > out2 || fail=1
+compare out2 in || fail=1
+
+LC_ALL=en_US.UTF-8 grep -oP '. euro' in > out3 || fail=1
+compare out3 in || fail=1
+
+LC_ALL=en_US.UTF-8 grep -P '^\P{S}' in > out4
+compare out4 /dev/null || fail=1
+
+Exit $fail

http://git.savannah.gnu.org/cgit/grep.git/commit/?id=67436786c110bbb565f0c1b96f1ca1d4586e1c8d


commit 8f365f028427e4f8f6f52e548a3a0cbf3c9e94db
Author: Paolo Bonzini <address@hidden>
Date:   Wed Oct 3 11:19:03 2012 +0200

    tests: include UTF-8 testcases for grep -P
    
    * tests/Makefile.am (TESTS): Add pcre-utf8.
    * tests/pcre-utf8: New file.

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 58deaa2..2f99a69 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -75,6 +75,7 @@ TESTS =                                               \
   options                                      \
   pcre                                         \
   pcre-abort                                   \
+  pcre-utf8                                    \
   pcre-z                                       \
   prefix-of-multibyte                          \
   r-dot                                                \
diff --git a/tests/pcre-utf8 b/tests/pcre-utf8
new file mode 100755
index 0000000..b86b114
--- /dev/null
+++ b/tests/pcre-utf8
@@ -0,0 +1,33 @@
+#! /bin/sh
+# Ensure that, with -P, Unicode \p{} symbols are correctly matched.
+#
+# Copyright (C) 2001, 2006, 2009-2012 Free Software Foundation, Inc.
+#
+# Copying and distribution of this file, with or without modification,
+# are permitted in any medium without royalty provided the copyright
+# notice and this notice are preserved.
+
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+require_pcre_
+require_en_utf8_locale_
+
+fail=0
+
+echo '$' | LC_ALL=en_US.UTF-8 grep -qP '\p{S}' || exit 77
+
+euro='\xe2\x82\xac euro'
+printf "$euro\\n" > in || framework_failure_
+
+LC_ALL=en_US.UTF-8 grep -P '^\p{S}' in > out || fail=1
+compare out in || fail=1
+
+LC_ALL=en_US.UTF-8 grep -P '^. euro$' in > out2 || fail=1
+compare out2 in || fail=1
+
+LC_ALL=en_US.UTF-8 grep -oP '. euro' in > out3 || fail=1
+compare out3 in || fail=1
+
+LC_ALL=en_US.UTF-8 grep -P '^\P{S}' in > out4
+compare out4 /dev/null || fail=1
+
+Exit $fail

-----------------------------------------------------------------------

Summary of changes:
 NEWS              |    6 ++++++
 src/pcresearch.c  |    8 ++++++++
 tests/Makefile.am |    1 +
 tests/pcre-utf8   |   33 +++++++++++++++++++++++++++++++++
 4 files changed, 48 insertions(+), 0 deletions(-)
 create mode 100755 tests/pcre-utf8


hooks/post-receive
-- 
grep



reply via email to

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