From: Sylvestre Ledru <[email protected]> * tests/stat/stat-printf.pl (f-empty, f-empty2, f-empty-terse) (p-empty, fs-empty): New tests, ensuring an empty format is used rather than the default one.
https://github.com/uutils/coreutils/pull/16451 Link: https://github.com/coreutils/coreutils/pull/464 --- tests/stat/stat-printf.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/stat/stat-printf.pl b/tests/stat/stat-printf.pl index 4f02df6ee..6ae26ccc6 100755 --- a/tests/stat/stat-printf.pl +++ b/tests/stat/stat-printf.pl @@ -45,6 +45,12 @@ my @Tests = # With --format, there *is* a trailing newline. ['f-nl', "--format=%n .", {OUT=>".\n"}], ['f-nl2', "--format=%n . .", {OUT=>".\n.\n"}], + # An empty format is used, not the default one. + ['f-empty', "--format='' .", {OUT=>"\n"}], + ['f-empty2', "-c '' . .", {OUT=>"\n\n"}], + ['f-empty-terse', "-t -c '' .", {OUT=>"\n"}], + ['p-empty', "--printf='' .", {OUT=>""}], + ['fs-empty', "-f -c '' .", {OUT=>"\n"}], ['end-pct', "--printf=% .", {OUT=>"%"}], ['pct-pct', "--printf=%% .", {OUT=>"%"}], -- 2.56.0
