From: Collin Funk Date: Sat, 18 Jul 2026 04:56:03 +0000 (-0700) Subject: tests: paste: check the delimiter is reset for each file when -s is used X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=8bc9a812466959f8b461cd57361bd055367e83c0;p=thirdparty%2Fcoreutils.git tests: paste: check the delimiter is reset for each file when -s is used * tests/paste/paste.pl (@Tests): Add a test case. --- diff --git a/tests/paste/paste.pl b/tests/paste/paste.pl index c890a2a566..3a1be17811 100755 --- a/tests/paste/paste.pl +++ b/tests/paste/paste.pl @@ -69,6 +69,11 @@ my @Tests = # \0 allows cycling through an empty delimiter (while "-d ''" does not) ['delim-empty-1', q{-s -d '\0,'}, {IN=>"1\n2\n3\n"}, {OUT=>"12,3\n"}], + # POSIX says that when -s is specified, the delimiter should reset to + # the first element of the list after each file is processed. + ['s-file-reset-1', '-s -d abc', {IN=>"0\n1\n"}, {IN=>"2\n3\n4\n5\n6\n"}, + {IN=>"7\n8\n9\n"}, {OUT=>"0a1\n2a3b4c5a6\n7a8b9\n"}], + # POSIX escapes ['delim-esc-0', q{-s -d '\0'}, {IN=>"1\n2\n"}, {OUT=>"12\n"}], ['delim-esc-n', q{-s -d '\n'}, {IN=>"1\n2\n"}, {OUT=>"1\n2\n"}],