Open
Conversation
This comment was marked as off-topic.
This comment was marked as off-topic.
|
GNU testsuite comparison: |
Contributor
|
@mattsu2020 FYI, the "merge branch" just makes review slower ;) |
Contributor
Author
sorry |
|
GNU testsuite comparison: |
- Introduce WriteError variant in CatError enum to specifically handle stdout write failures - Add map_write_err helper to wrap io::Result into CatResult with WriteError - Update cat_files to catch WriteError early and report using localized message - Wrap write_all and flush calls in write_fast and write_lines with map_write_err - Add localized error messages for "write error" in en-US and fr-FR locales This improves error reporting for I/O issues like broken pipes during output.
…ite_nonprint_to_end Removed a trailing semicolon following the match arms in the `write_nonprint_to_end` function, which was likely causing a compiler warning or style issue in Rust. This ensures cleaner code without altering functionality.
- Adds a new test case to verify that `cat /dev/stdin` properly handles writing to a full device (/dev/full) and outputs the correct error message "No space left on device" without the raw errno code. This improves test coverage for error handling on Unix-like systems.
- Prevents spell-checker from flagging ENOSPC as a misspelling, as it's a valid errno constant (e.g., "No space left on device") used in the test code.
|
GNU testsuite comparison: |
Merging this PR will not alter performance
Comparing Footnotes
|
Remove the unused import of `uucore::libc` that was only included on non-Windows platforms, simplifying the code and reducing unnecessary dependencies.
|
GNU testsuite comparison: |
Adds a test case for the `cat` utility when using line numbering (`-n` option) and piping to `/dev/full`. This test verifies that the expected error message is displayed when the output device is full, ensuring consistent error handling behavior across different cat invocation patterns.
|
GNU testsuite comparison: |
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.
To align with GNU coreutils behavior
Changes to ENOSPC handling
related
#9920