bug-grep
[Top][All Lists]
Advanced

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

Re: [PATCH 26/34] tests: skip tests that require MBS support


From: Jim Meyering
Subject: Re: [PATCH 26/34] tests: skip tests that require MBS support
Date: Thu, 15 Sep 2011 13:41:37 +0200

Paolo Bonzini wrote:

> On 09/15/2011 12:28 PM, Jim Meyering wrote:
>> diff --git a/tests/init.cfg b/tests/init.cfg
>> index f6ead9c..42889e6 100644
>> --- a/tests/init.cfg
>> +++ b/tests/init.cfg
>> @@ -78,3 +78,10 @@ require_ru_RU_koi8_r()
>>       *) skip_test_ 'ru_RU.KOI8-R locale not found' ;;
>>     esac
>>   }
>> +
>> +require_compiled_in_MBS_support()
>                        ^^^
>
> either MB or MBCS

Good point.  I'm too used to typing MBS, due to the name
of that legacy symbol.  I've used "MB".  Thanks.

>> +{
>> +  require_en_utf8_locale_
>> +  printf 'é' | LC_ALL=en_US.UTF-8 grep '[[:lower:]]' \
>> +    || skip_ this test requires MBS support
>> +}
>
> I think a better test is
>
>   printf '\xc3' | LC_ALL=en_US.UTF-8 grep '[é]'
>
> Otherwise you're relying on glibc providing a full definition of [[:lower:]].

Good point.
However, I'll do that as a separate patch.

> However, this test is already in use in tests/char-class-multibyte as
> a testcase.  So if you make the change you need to remove this bit
> from char-class-multibyte.
>
> for LOC in en_US.UTF-8 $LOCALE_FR_UTF8; do
>   out=out3-$LOC
>   printf '\xc3\n' | LC_ALL=$LOC grep '[é]' > $out
>   test $? = 1 || fail=1
> done
>
> I would also do this change quite early, before touching the code.

I would have moved it, but it's not trivial due to the nearby
use of skip_test_, which is changed in another commit.



reply via email to

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