Re: [ping] [PATCH] Different outputs affected by locale

Pedro Alves
2014-06-17T10:03:40Z

On 06/17/2014 04:44 AM, Yao Qi wrote:
> On 06/13/2014 01:23 AM, Pedro Alves wrote:
>> So what I'm thinking is indeed going with making the test
>> accept the cent, but conditioned, like:
>
> OK, that is more restrict.
>
>>
>> # Fallback to assuming 7-bit ASCII. Test are ran under LC_CTYPE=C.
>>
>> set cent "\\\\242"
>>
>> set test "show host-charset"
>> gdb_test_multiple $test $test {
>> -re "CP1252\r\n$gdb_prompt $" {
>
> I tweak the pattern to match the output...
>
>> # With Windows code page 1252 (Latin 1), the cent
>> # is printable.
>> set cent "\u00A2"
>> pass $test
>> }
>> -re "$gdb_prompt $" {
>> pass $test
>> }
>> }
>
> ... and how about the patch below?
>

Looks good to me.

Thanks,
--
Pedro Alves