-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
cat: error when output is input and appending #7260
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: |
f90a322 to
215b8cb
Compare
|
GNU testsuite comparison: |
|
Is it possible to add a test for this? |
|
There probably is a way to test it, but I'm not sure how to do it from inside Rust. We just need to do something like and check for the error. |
|
Here is a test that checks the behavior. It's the occasion to shout out to the people who engineered the testsuite. It's really easy to use, and it works like a charm. Thank you very much, testsuite maker 🙏 |
|
Thanks @RenjiSann, I've included your commit in this branch. |
|
GNU testsuite comparison: |
|
Actually, I have not checked that it worked correctly on every platform, and I haven't cleaned it either, that's why CI is failing ^^; |
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
RenjiSann
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.
The changes look good to me 👌 :
Please squash all the commits related to the test in a single one to reduce verbosity on the main branch, and e'll be good to go 👍
Change `cat` so that it terminates with an error message when the input
file is the same as the output file and the output file is being
appended to. For example,
cat <f >>f
cat: -: input file is output file
Fixes uutils#7165
3e62b24 to
9a88526
Compare
|
GNU testsuite comparison: |
|
Thank you for the change ! |
Change
catso that it terminates with an error message when the input file is the same as the output file and the output file is being appended to. For example,Fixes #7165