[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/4] tests: exercise latent bug in character ranges
From: |
Jim Meyering |
Subject: |
Re: [PATCH 1/4] tests: exercise latent bug in character ranges |
Date: |
Tue, 07 Jun 2011 13:10:52 +0200 |
Paolo Bonzini wrote:
> * tests/bogus-wctob: New.
> * Makefile.am (TESTS): Add it.
...
ACK, modulo nits.
> diff --git a/tests/Makefile.am b/tests/Makefile.am
> index f354e4a..22bad3e 100644
> --- a/tests/Makefile.am
> +++ b/tests/Makefile.am
> @@ -39,6 +39,7 @@ TESTS = \
> backref-multibyte-slow \
> backref-word \
> bre \
> + bogus-wctob \
alphabetize?
> case-fold-backref \
> case-fold-backslash-w \
> case-fold-char-class \
> diff --git a/tests/bogus-wctob b/tests/bogus-wctob
> new file mode 100644
> index 0000000..0237062
> --- /dev/null
> +++ b/tests/bogus-wctob
> @@ -0,0 +1,17 @@
> +#!/bin/sh
> +# This was latent in grep-2.8 and earlier because we punted interpretation
> +# of MBCSETs to glibc. However, it becomes apparent as soon "[à]" is
> +# simplified to "à".
s/as soon/as soon as/
> +. "${srcdir=.}/init.sh"; path_prepend_ ../src
> +
> +printf '\340' > in || framework_failure_
> +fail=0
> +
> +LC_ALL=en_US.UTF-8 grep '[à]' in
> +case $? in
> + 0) fail=1 ;;
> + 1) ;;
> + 2) framework_failure_ unexpected error from grep ;;
> +esac
> +
> +Exit $fail