link: add tests for zero args and existing destination#11119
link: add tests for zero args and existing destination#11119anihal wants to merge 4 commits intouutils:mainfrom
Conversation
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
sylvestre
left a comment
There was a problem hiding this comment.
thanks for these tests but they are failing for now
08564aa to
bf20278
Compare
|
GNU testsuite comparison: |
|
Hi @sylvestre, the failing tests have been fixed:
All 8 link tests now pass across platforms. The 3 currently failing CI jobs ( Could you take another look? Thanks! |
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
Merging this PR will degrade performance by 3.41%
Performance Changes
Comparing Footnotes
|
Split the chained method call onto separate lines to match rustfmt's expected formatting.
The EEXIST error message varies by OS: Linux/macOS reports "File exists" while OpenBSD reports "Already exists". Broaden the match to "exists" to cover all platforms.
- test_link_no_arguments: clap emits "the following required arguments were not provided" (not "2 values required") when zero args are given; drop the stderr assertion and keep only .fails(). - test_link_dest_exists: collapse the method chain to one line to satisfy rustfmt.
585d31e to
802776a
Compare
|
GNU testsuite comparison: |
Adds two edge-case tests for
link:test_link_no_arguments: verifies that callinglinkwith no arguments fails with the expected usage errortest_link_dest_exists: verifies that attempting to hard-link when the destination already exists fails with "File exists"The existing tests cover nonexistent source, circular links, and wrong argument counts (1 or 3), but these two cases were missing.