[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] augment case-fold-char-class test case
From: |
Jim Meyering |
Subject: |
Re: [PATCH] augment case-fold-char-class test case |
Date: |
Sat, 06 Mar 2010 09:37:35 +0100 |
Paolo Bonzini wrote:
> * tests/case-fold-char-class: Test matching lowercase against uppercase
> as well as vice versa.
> ---
> tests/case-fold-char-class | 14 +++++++++++---
> 1 files changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/tests/case-fold-char-class b/tests/case-fold-char-class
> index c36b314..c180be0 100644
> --- a/tests/case-fold-char-class
> +++ b/tests/case-fold-char-class
> @@ -3,12 +3,20 @@
> : ${srcdir=.}
> . "$srcdir/init.sh"; path_prepend_ ../src
>
> -printf 'Y\n' > exp || framework_failure
> +printf 'Y\n' > exp1 || framework_failure
> fail=0
>
> for LOC in en_US.UTF-8 zh_CN $LOCALE_FR_UTF8; do
> - printf 'X\nY\nZ\n' | LC_ALL=$LOC grep -i '[y]' > out || fail=1
> - compare out exp || fail=1
> + printf 'X\nY\nZ\n' | LC_ALL=$LOC grep -i '[y]' > out1 || fail=1
> + compare out1 exp1 || fail=1
> +done
> +
> +printf 'y\n' > exp2 || framework_failure
> +fail=0
Thanks.
That's fine, but please don't reset fail=0.
And it'd be slightly nicer (less duplication) to perform both
tests in the same loop.
> +for LOC in en_US.UTF-8 zh_CN $LOCALE_FR_UTF8; do
> + printf 'x\ny\nz\n' | LC_ALL=$LOC grep -i '[Y]' > out2 || fail=1
> + compare out2 exp2 || fail=1
> done
>
> Exit $fail