From 4d62d46a417d6c3ee19a26c8c11a5a00db95256b Mon Sep 17 00:00:00 2001 From: Bernhard Voelker Date: Sun, 29 Sep 2024 17:39:16 +0200 Subject: [PATCH] tests: add fold(1) test for --bytes option Inspired by: - https://access.redhat.com/solutions/3459791 - https://src.fedoraproject.org/rpms/coreutils/c/8080f5a15a20362c * tests/misc/fold.pl (bw1, bw2): Add tests for 'fold -b'. --- tests/misc/fold.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/misc/fold.pl b/tests/misc/fold.pl index 3a37840dc..2628f9555 100755 --- a/tests/misc/fold.pl +++ b/tests/misc/fold.pl @@ -36,6 +36,12 @@ my @Tests = # The I18N patch was fixed only in July 2024. (rhbz#2296201). ['enoent', 'enoent', {EXIT => 1}, {ERR=>"$prog: enoent: No such file or directory\n"}], + + # The downstream I18N patch made 'fold -b' mishandled '\n' in UTF locales. + # The I18N patch was fixed only in Sep 2024. (RHEL-60295) + ['bw1', '-b -w 4', {IN=>"abcdef\nghijkl"}, {OUT=>"abcd\nef\nghij\nkl"}], + ['bw2', '-b -w 6', {IN=>"1234567890\nabcdefghij\n1234567890"}, + {OUT=>"123456\n7890\nabcdef\nghij\n123456\n7890"}], ); my $save_temps = $ENV{DEBUG}; -- 2.11.4.GIT