cat: error when output is input and appending#7260
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.
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