Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fmt: fix error priority, make goal-errors more helpful #6362

Merged
merged 1 commit into from
May 7, 2024

Conversation

BenWiederhake
Copy link
Collaborator

Fixes #6352.

In particular, this changes a deviation from GNU to a more helpful deviation from GNU:

$ ../gnu/src/fmt -g apple
../gnu/src/fmt: invalid width: 'apple'
[$? = 1]
$ cargo run -q fmt -g apple # Before this PR
fmt: invalid value 'apple'
[$? = 1]
$ cargo run -q fmt -g apple # After this PR
fmt: invalid goal: 'apple'
[$? = 1]

tests/by-util/test_fmt.rs Outdated Show resolved Hide resolved
@BenWiederhake
Copy link
Collaborator Author

Changes since last push:

  • Rebased
  • Remove testcase of questionable use (thanks @cakebaker!)

In case anyone's curious, I was a bit paranoid about whether the value itself influences the priority in any way. This test proves that it does not; just as expected. That level of paranoia is not necessary with our own code.

Copy link

github-actions bot commented May 6, 2024

GNU testsuite comparison:

Skip an intermittent issue tests/tail/inotify-dir-recreate (fails in this run but passes in the 'main' branch)

@cakebaker cakebaker merged commit 0e9ce50 into uutils:main May 7, 2024
66 of 68 checks passed
@cakebaker
Copy link
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fmt: Error priorities could be improved
2 participants