From ddcabc55b5f4c067b7e09dec180a908c0fcfa1bc Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 29 Oct 2026 21:30:38 +0100 Subject: [PATCH] tests: ls: ensure --block-size=0 is rejected despite later size options Reported at https://github.com/uutils/coreutils/issues/16008 * tests/ls/ls-misc.pl: Add test cases. Link: https://github.com/coreutils/coreutils/pull/420 --- tests/ls/ls-misc.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/ls/ls-misc.pl b/tests/ls/ls-misc.pl index 806f2ec04..60b52c4fc 100755 --- a/tests/ls/ls-misc.pl +++ b/tests/ls/ls-misc.pl @@ -355,6 +355,12 @@ my @Tests = {ERR => "$prog: invalid tab size: '$_'\n"}, {EXIT => 2}, ] } qw(-9 zz 0.5)), + + # --block-size=0 is invalid, even if a later option overrides it. + (map { ["block-size-zero$_", "--block-size=0 $_", + {ERR => "$prog: invalid --block-size argument '0'\n"}, + {EXIT => 2}, + ] } ('', '--si', '-h')), ); umask 022;