From: Sylvestre Ledru Date: Fri, 10 Jul 2026 01:52:00 +0000 (-0400) Subject: tests: cut: check byte-wise -c and -b -n in the C locale X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fb631c3e6dd29d89e4c65b8e3969deb1db2bcb98;p=thirdparty%2Fcoreutils.git tests: cut: check byte-wise -c and -b -n in the C locale * tests/cut/cut.pl: Add cases verifying that in the C locale -c and -b -n select a single byte instead of decoding a multi-byte sequence. Link: https://github.com/coreutils/coreutils/pull/316 --- diff --git a/tests/cut/cut.pl b/tests/cut/cut.pl index 6f589a9b59..7e4a7ef80c 100755 --- a/tests/cut/cut.pl +++ b/tests/cut/cut.pl @@ -453,6 +453,10 @@ defined $single_byte_locale and push @Tests, ['mb-delim-C', '-d', "\xc3\xa9", '-f1', {EXIT=>1}, {ERR=>$single_char}, + {ENV => "LC_ALL=$single_byte_locale"}], + ['c-locale-byte', '-c2', {IN=>"a\xC3\xA9b\n"}, {OUT=>"\xC3\n"}, + {ENV => "LC_ALL=$single_byte_locale"}], + ['c-locale-nosplit', qw(-b2 -n), {IN=>"a\xC3\xA9b\n"}, {OUT=>"\xC3\n"}, {ENV => "LC_ALL=$single_byte_locale"}];