cp: set status code when encountering circular symbolic links#9757
Conversation
…n copying directory
… circular symbolic links during directory copy
| ucmd.arg(source_dir) | ||
| .arg(target_dir) | ||
| .arg("-rL") | ||
| .fails_with_code(1); |
There was a problem hiding this comment.
please also verify the output
There was a problem hiding this comment.
I updated the test to check for the output. I did not check for an exact match of the stderr since I think they might differ slightly depending on the OS and "Too many levels of symbolic links" should be a good enough indicator that the command is outputting what we expect I think.
There was a problem hiding this comment.
I don't want to make the test to complex and test for the full output for the different OSes so I updated the test to simply check for the string from walkdir.
There was a problem hiding this comment.
I updated the tests again to include windows-specific syntax for the error message
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
|
Fixed the merge conflicts. |
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
|
Fixed the formatting issue. |
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
|
Fixed the conflicts with the tests |
|
GNU testsuite comparison: |
Fixes #9710
Change from using the
show_error!macro to theshow!macro which correctly sets the status code.Added a new test to validate this behavior.