Make the gix_path::env::git
tests clearer and more granular
#2133
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.
This revises and adds comments to make clearer what is going on and why in the code that supports
gix-path
tests of theenv::git
module.This also splits a two large test cases into smaller cases with one assertion each, both so the new test names can clarify what the tests are for, and so that it is easier to figure out exactly what is breaking if they fail.
This PR only changes test code. It is a prelude to a subsequent PR (edit: #2134), which I plan to open shortly after this is merged, to add entries in
ALTERNATIVE_LOCATIONS
to findgit.exe
in a user-wide installation of Git for Windows even when it is not inPATH
.In #2115, test refactoring and clarification came in the same PR as the subsequent new functionality whose testing they supported. I did it that way there because those changes by themselves would've reinforced some commented claims that were no longer true, such as the claim that
clangarm64
was not yet being used officially by Git for Windows. In contrast, I think there is no disadvantage to the test suite changes made here, even if the subsequent enhancements take longer than I expect.