[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 05/10] tests: stat: check an empty --format or --printf
|
From: |
Pádraig Brady |
|
Subject: |
[PATCH 05/10] tests: stat: check an empty --format or --printf |
|
Date: |
Sun, 15 Nov 2026 16:20:08 +0000 |
From: Sylvestre Ledru <sylvestre@debian.org>
* 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
- [PATCH 01/10] tests: fmt: add -t tests with a one-line paragraph, Pádraig Brady, 2026/11/15
- [PATCH 06/10] tests: join: check -o fields after the file operands, Pádraig Brady, 2026/11/15
- [PATCH 07/10] tests: seq: check -w with scientific notation, Pádraig Brady, 2026/11/15
- [PATCH 04/10] tests: stat: check the 0 flag with a precision, Pádraig Brady, 2026/11/15
- [PATCH 05/10] tests: stat: check an empty --format or --printf,
Pádraig Brady <=
- [PATCH 08/10] tests: expand: check the column is kept across files and buffers, Pádraig Brady, 2026/11/15
- [PATCH 10/10] tests: stat: check %#a adds a single leading 0, Pádraig Brady, 2026/11/15
- [PATCH 02/10] tests: dircolors: check TERM filtering of the built-in database, Pádraig Brady, 2026/11/15
- [PATCH 03/10] tests: pr: check -m with a separator and a page width, Pádraig Brady, 2026/11/15
- [PATCH 09/10] tests: nl: check option values starting with a hyphen, Pádraig Brady, 2026/11/15