link: add tests for zero args and existing destination#11119
Open
anihal wants to merge 5 commits intouutils:mainfrom
Open
link: add tests for zero args and existing destination#11119anihal wants to merge 5 commits intouutils:mainfrom
anihal wants to merge 5 commits intouutils:mainfrom
Conversation
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
sylvestre
requested changes
Feb 26, 2026
Contributor
sylvestre
left a comment
There was a problem hiding this comment.
thanks for these tests but they are failing for now
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.
08564aa to
bf20278
Compare
|
GNU testsuite comparison: |
Contributor
Author
|
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: |
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.
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.