]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: cut: check byte-wise -c and -b -n in the C locale
authorSylvestre Ledru <sylvestre@debian.org>
Fri, 10 Jul 2026 01:52:00 +0000 (21:52 -0400)
committerPádraig Brady <P@draigBrady.com>
Sat, 11 Jul 2026 08:21:02 +0000 (09:21 +0100)
* 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
tests/cut/cut.pl

index 6f589a9b594415ee952995a13070e3056188de2f..7e4a7ef80c6e939676871d12c39ee665f6e6e967 100755 (executable)
@@ -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"}];