fish: fix and enable fishConfig
test
#86802
Merged
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.
nix-build -A fish.tests.fishConfig
will now test that thefish_config
tool would start up properly. Previously, this test waseffectively disabled due to
withTests
being stubbed out.I don't think this test ever truly worked, because the generated
temporary file would be cleaned up automatically (or maybe this
"automatically" changed between versions). The solution to this is to
add
delete=False
to theNamedTemporaryFile
function call, to keepthe temporary file around in order to grep its contents for the expected
output.
Motivation for this change
The test had been effectively disabled for a long time.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)Is there any way to avoid having the derivation for
fish
itself belet
-bound? It certainly makes it easier for thefishConfig
test to refer to paths inside the derivation, but I wonder if there's a better way.