-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
hashsum: improve the error management to match GNU #6252
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
Conversation
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
BenWiederhake
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Two nits:
- I guess the seq commits should have been part of a separate PR, but whatever, let's merge it.
- The code handles singular/plural forms separately, but the tests don't check for it. Shouldn't that be tested?
| .fails() | ||
| .stdout_is("sha1sum: testf: No such file or directory\ntestf: FAILED open or read\n") | ||
| .stderr_is("sha1sum: warning: 1 listed file could not be read\n"); | ||
| .stderr_is("sha1sum: WARNING: 1 listed file could not be read\n"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code potentially outputs a plural form. Is that part of our guarantee to the user?
- If yes, then it should be part of the tests.
- If no, then the code can be deleted/simplified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i will do it in a different PR, I have other changes pending
Should make tests/cksum/md5sum.pl and tests/cksum/sha1sum.pl pass
|
the seq change was a mistake, I removed it |
Should make tests/cksum/md5sum.pl pass