coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] tests: du: test --block-size with thousands separators


From: Collin Funk
Subject: Re: [PATCH] tests: du: test --block-size with thousands separators
Date: Fri, 31 Jul 2026 22:02:05 -0700
User-agent: Gnus/5.13 (Gnus v5.13)

Pádraig Brady <P@draigBrady.com> writes:

> On 31/07/2026 07:49, Collin Funk wrote:
>> +  for loc in C "$LOCALE_FR" "$LOCALE_FR_UTF8"; do
>> +    test -z "$loc" && continue
>> +    thousands_sep=$(LC_ALL=$loc locale thousands_sep)
>> +    test -z "$thousands_sep" && continue
>> +    for f in exp exp1; do
>> +      LC_ALL=$loc \
>> +        sed 's/^\([0-9][0-9]*\)\([0-9]\{3\}\)/\1'"$thousands_sep"'\2/g' $f \
>> +          >$loc$f || framework_failure_
>> +    done
>
> It's probably worth verifying "grouping" also.
>
>   grouping=$(LC_ALL=$loc locale grouping)
>   test "$grouping" != 3 && continue

Right, I forgot about that.

I pushed it with that change and another minor fix [1]. I didn't realize
"$(LC_ALL=C locale thousands_sep)" returned an empty string. So, I just
skipped using 'locale' for the C locale.

Collin

[1] 
https://github.com/coreutils/coreutils/commit/e341208d065837719cb1c7d82e2f7a1e51c8768b



reply via email to

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