grep-commit
[Top][All Lists]
Advanced

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

grep branch, master, updated. v2.8-12-gde5f700


From: Jim Meyering
Subject: grep branch, master, updated. v2.8-12-gde5f700
Date: Tue, 07 Jun 2011 09:11:06 +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  de5f7000d12747b4729dd1cfc3b0c06e97b0b932 (commit)
       via  cdd225afe8e94e87933642ed54d24ebdbac85757 (commit)
       via  a5258004a87174122463f8160ea0eb6781fa2c95 (commit)
      from  38cbab6ec7e851bdb64c68499eda5fc2e680d197 (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=de5f7000d12747b4729dd1cfc3b0c06e97b0b932


commit de5f7000d12747b4729dd1cfc3b0c06e97b0b932
Author: Jim Meyering <address@hidden>
Date:   Thu Jun 2 11:01:35 2011 +0200

    tests: exercise a uni-byte [...] bug: requires ru_RU.KOI8-R
    
    * tests/unibyte-bracket-expr: New file.
    * tests/Makefile.am (TESTS): Add it.
    * init.cfg (require_ru_RU_koi8_r): New function.

diff --git a/tests/Makefile.am b/tests/Makefile.am
index a01b004..f354e4a 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -63,6 +63,7 @@ TESTS =                                               \
   inconsistent-range                            \
   khadafy                                      \
   max-count-vs-context                         \
+  unibyte-bracket-expr                         \
   high-bit-range                               \
   options                                      \
   pcre                                         \
diff --git a/tests/init.cfg b/tests/init.cfg
index 3429f0d..f6ead9c 100644
--- a/tests/init.cfg
+++ b/tests/init.cfg
@@ -69,3 +69,12 @@ require_en_utf8_locale_()
     *) skip_test_ 'en_US.UTF-8 locale not found' ;;
   esac
 }
+
+require_ru_RU_koi8_r()
+{
+  path_prepend_ .
+  case $(get-mb-cur-max ru_RU.KOI8-R) in
+    1) ;;
+    *) skip_test_ 'ru_RU.KOI8-R locale not found' ;;
+  esac
+}
diff --git a/tests/unibyte-bracket-expr b/tests/unibyte-bracket-expr
new file mode 100644
index 0000000..a0b51dd
--- /dev/null
+++ b/tests/unibyte-bracket-expr
@@ -0,0 +1,41 @@
+#!/bin/sh
+# Exercise a DFA range bug that arises only with a unibyte encoding
+# for which the wide-char-to-single-byte mapping is nontrivial.
+# E.g., the regexp, [C] would fail to match C in a unibyte locale like
+# ru_RU.KOI8-R for any C whose wide-char representation differed from
+# its single-byte equivalent.
+
+# Copyright (C) 2011 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+require_ru_RU_koi8_r
+LC_ALL=ru_RU.KOI8-R
+export LC_ALL
+
+fail=0
+
+for i in 8 9 a b c d e f; do
+  for j in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do
+    in=in-$i$j
+    b=$(printf "\\x$i$j")
+    echo "$b" > $in || framework_failure_
+    cp $in /t
+    grep "[$b]" $in > out || fail=1
+    compare out $in || fail=1
+  done
+done
+
+Exit $fail

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


commit de5f7000d12747b4729dd1cfc3b0c06e97b0b932
Author: Jim Meyering <address@hidden>
Date:   Thu Jun 2 11:01:35 2011 +0200

    tests: exercise a uni-byte [...] bug: requires ru_RU.KOI8-R
    
    * tests/unibyte-bracket-expr: New file.
    * tests/Makefile.am (TESTS): Add it.
    * init.cfg (require_ru_RU_koi8_r): New function.

diff --git a/tests/Makefile.am b/tests/Makefile.am
index a01b004..f354e4a 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -63,6 +63,7 @@ TESTS =                                               \
   inconsistent-range                            \
   khadafy                                      \
   max-count-vs-context                         \
+  unibyte-bracket-expr                         \
   high-bit-range                               \
   options                                      \
   pcre                                         \
diff --git a/tests/init.cfg b/tests/init.cfg
index 3429f0d..f6ead9c 100644
--- a/tests/init.cfg
+++ b/tests/init.cfg
@@ -69,3 +69,12 @@ require_en_utf8_locale_()
     *) skip_test_ 'en_US.UTF-8 locale not found' ;;
   esac
 }
+
+require_ru_RU_koi8_r()
+{
+  path_prepend_ .
+  case $(get-mb-cur-max ru_RU.KOI8-R) in
+    1) ;;
+    *) skip_test_ 'ru_RU.KOI8-R locale not found' ;;
+  esac
+}
diff --git a/tests/unibyte-bracket-expr b/tests/unibyte-bracket-expr
new file mode 100644
index 0000000..a0b51dd
--- /dev/null
+++ b/tests/unibyte-bracket-expr
@@ -0,0 +1,41 @@
+#!/bin/sh
+# Exercise a DFA range bug that arises only with a unibyte encoding
+# for which the wide-char-to-single-byte mapping is nontrivial.
+# E.g., the regexp, [C] would fail to match C in a unibyte locale like
+# ru_RU.KOI8-R for any C whose wide-char representation differed from
+# its single-byte equivalent.
+
+# Copyright (C) 2011 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+require_ru_RU_koi8_r
+LC_ALL=ru_RU.KOI8-R
+export LC_ALL
+
+fail=0
+
+for i in 8 9 a b c d e f; do
+  for j in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do
+    in=in-$i$j
+    b=$(printf "\\x$i$j")
+    echo "$b" > $in || framework_failure_
+    cp $in /t
+    grep "[$b]" $in > out || fail=1
+    compare out $in || fail=1
+  done
+done
+
+Exit $fail

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


commit de5f7000d12747b4729dd1cfc3b0c06e97b0b932
Author: Jim Meyering <address@hidden>
Date:   Thu Jun 2 11:01:35 2011 +0200

    tests: exercise a uni-byte [...] bug: requires ru_RU.KOI8-R
    
    * tests/unibyte-bracket-expr: New file.
    * tests/Makefile.am (TESTS): Add it.
    * init.cfg (require_ru_RU_koi8_r): New function.

diff --git a/tests/Makefile.am b/tests/Makefile.am
index a01b004..f354e4a 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -63,6 +63,7 @@ TESTS =                                               \
   inconsistent-range                            \
   khadafy                                      \
   max-count-vs-context                         \
+  unibyte-bracket-expr                         \
   high-bit-range                               \
   options                                      \
   pcre                                         \
diff --git a/tests/init.cfg b/tests/init.cfg
index 3429f0d..f6ead9c 100644
--- a/tests/init.cfg
+++ b/tests/init.cfg
@@ -69,3 +69,12 @@ require_en_utf8_locale_()
     *) skip_test_ 'en_US.UTF-8 locale not found' ;;
   esac
 }
+
+require_ru_RU_koi8_r()
+{
+  path_prepend_ .
+  case $(get-mb-cur-max ru_RU.KOI8-R) in
+    1) ;;
+    *) skip_test_ 'ru_RU.KOI8-R locale not found' ;;
+  esac
+}
diff --git a/tests/unibyte-bracket-expr b/tests/unibyte-bracket-expr
new file mode 100644
index 0000000..a0b51dd
--- /dev/null
+++ b/tests/unibyte-bracket-expr
@@ -0,0 +1,41 @@
+#!/bin/sh
+# Exercise a DFA range bug that arises only with a unibyte encoding
+# for which the wide-char-to-single-byte mapping is nontrivial.
+# E.g., the regexp, [C] would fail to match C in a unibyte locale like
+# ru_RU.KOI8-R for any C whose wide-char representation differed from
+# its single-byte equivalent.
+
+# Copyright (C) 2011 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+require_ru_RU_koi8_r
+LC_ALL=ru_RU.KOI8-R
+export LC_ALL
+
+fail=0
+
+for i in 8 9 a b c d e f; do
+  for j in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do
+    in=in-$i$j
+    b=$(printf "\\x$i$j")
+    echo "$b" > $in || framework_failure_
+    cp $in /t
+    grep "[$b]" $in > out || fail=1
+    compare out $in || fail=1
+  done
+done
+
+Exit $fail

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

Summary of changes:
 NEWS                                           |    4 +++
 src/dfa.c                                      |   10 ++++++--
 tests/Makefile.am                              |    1 +
 tests/euc-mb                                   |    2 +-
 tests/fmbtest                                  |    2 +-
 tests/init.cfg                                 |   25 +++++++++++++++++++++--
 tests/sjis-mb                                  |    2 +-
 tests/{high-bit-range => unibyte-bracket-expr} |   23 +++++++++++++++++----
 8 files changed, 55 insertions(+), 14 deletions(-)
 copy tests/{high-bit-range => unibyte-bracket-expr} (55%)


hooks/post-receive
-- 
grep



reply via email to

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