tests: ls: check that an invalid --tabsize is diagnosed#311
Closed
sylvestre wants to merge 1 commit into
Closed
Conversation
Devel08
reviewed
Jul 5, 2026
Devel08
left a comment
There was a problem hiding this comment.
we can also check for a floating point, as GNU ls rejects that too, something like
# A floating point --tabsize is not a valid width.
['tabsize-floating-point', '--tabsize=0.5',
{ERR => "$prog: invalid tab size: '0.5'\n"},
{EXIT => 2},
],
* 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. uutils/coreutils#13278
d365754 to
011aeb2
Compare
hubot
pushed a commit
that referenced
this pull request
Jul 6, 2026
* 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. uutils/coreutils#13278 Link: #311
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
bug(ls): when --tabsize is a negative number ls successeds instead of rejecting it uutils/coreutils#13278