[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/9] dfa: fix handling of ranges in multibyte character sets
From: |
Jim Meyering |
Subject: |
Re: [PATCH 2/9] dfa: fix handling of ranges in multibyte character sets |
Date: |
Mon, 15 Mar 2010 11:39:51 +0100 |
Paolo Bonzini wrote:
> * src/dfa.c (parse_bracket_exp_mb): Add separate ranges for
> lowercase and uppercase endpoints if folding case.
> * tests/Makefile.am (TESTS): Add case-fold-char-range.
> * tests/case-fold-char-range: New.
...
> diff --git a/tests/case-fold-char-range b/tests/case-fold-char-range
> new file mode 100644
> index 0000000..e683da9
> --- /dev/null
> +++ b/tests/case-fold-char-range
> @@ -0,0 +1,21 @@
> +#!/bin/sh
> +# This would fail for grep-2.5.3
> +: ${srcdir=.}
> +. "$srcdir/init.sh"; path_prepend_ ../src
> +
> +printf 'Y\n' > exp1 || framework_failure
> +fail=0
> +
> +for LOC in en_US.UTF-8 zh_CN $LOCALE_FR_UTF8; do
> + printf '1\nY\n.\n' | LC_ALL=$LOC grep -i '[a-z]' > out1 || fail=1
> + compare out1 exp1 || fail=1
> +done
> +
> +printf 'y\n' > exp2 || framework_failure
> +
> +for LOC in en_US.UTF-8 zh_CN $LOCALE_FR_UTF8; do
> + printf '1\ny\n.\n' | LC_ALL=$LOC grep -i '[A-Z]' > out2 || fail=1
> + compare out2 exp2 || fail=1
> +done
Hi Paolo,
Do you have a test that exercises this fix?
As far as I can see, the above tests currently succeed
with grep built from master. I expected them to fail.
[PATCH 3/9] dfa: rewrite handling of multibyte case_fold lexing, Paolo Bonzini, 2010/03/14
[PATCH 4/9] dfa: speed up handling of brackets, Paolo Bonzini, 2010/03/14