programs.git: test git integration options assertion

This commit is contained in:
Léana 江 2026-01-30 13:46:43 +01:00 committed by Austin Horstman
parent 715e6d7f89
commit cfb3b544f9
2 changed files with 24 additions and 0 deletions

View file

@ -10,4 +10,5 @@
git-with-lfs = ./git-with-lfs.nix;
git-with-maintenance = ./git-with-maintenance.nix;
git-settings-deprecations = ./git-settings-deprecations.nix;
git-integration-assertion = ./git-integration-assertion.nix;
}

View file

@ -0,0 +1,23 @@
let
enable = {
enable = true;
enableGitIntegration = true;
};
in
{
programs = {
delta = enable;
# FIXME(leana8959): these two aren't caught by the tests.
# diff-highlight = enable;
# diff-so-fancy = enable;
patdiff = enable;
};
test.asserts.assertions.expected = [
''
Only one of the following options can be enabled at a time.
- `programs.delta.enableGitIntegration'
- `programs.patdiff.enableGitIntegration'
''
];
}