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
This commit is contained in:
Sylvestre Ledru authored and Pádraig Brady committed 2026-07-11 09:21:02 +01:00
1 parent 9342ddbd71
commit fb631c3e6d
1 file changed
+4
+4
View File
@@ -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"}];