From: Sylvestre Ledru Date: Sat, 4 Jul 2026 19:15:00 +0000 (+0200) Subject: tests: ls: check that an invalid --tabsize is diagnosed X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=440fe62502e4a2b131dc1844a00c351fdfa110c7;p=thirdparty%2Fcoreutils.git tests: ls: check that an invalid --tabsize is diagnosed * tests/ls/ls-misc.pl: Add tests, generated by a loop over invalid values, verifying that a negative (-9), non-numeric (zz), or fractional (0.5) --tabsize argument is rejected with "invalid tab size" and exit status 2. https://github.com/uutils/coreutils/pull/13278 Link: https://github.com/coreutils/coreutils/pull/311 --- diff --git a/tests/ls/ls-misc.pl b/tests/ls/ls-misc.pl index 4a22e35f40..806f2ec040 100755 --- a/tests/ls/ls-misc.pl +++ b/tests/ls/ls-misc.pl @@ -349,6 +349,12 @@ my @Tests = $rmdir_reg, {EXIT => 2}, ], + + # Negative, non-numeric and fractional --tabsize values are invalid. + (map { ["tabsize-invalid-$_", "--tabsize=$_", + {ERR => "$prog: invalid tab size: '$_'\n"}, + {EXIT => 2}, + ] } qw(-9 zz 0.5)), ); umask 022;