1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 19:46:05 +01:00
home-manager/tests/modules/programs/difftastic/difftastic-with-git-external-diff.nix
Austin Horstman 4166d4e163 tests/difftastic: add
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-10-19 10:24:15 -05:00

25 lines
730 B
Nix

{
programs.difftastic = {
enable = true;
git = {
enable = true;
diffToolMode = false;
};
options = {
color = "always";
display = "side-by-side";
};
};
programs.git.enable = true;
nmt.script = ''
assertFileExists home-files/.config/git/config
assertFileContains home-files/.config/git/config '[diff]'
# Should have diff.external set
assertFileRegex home-files/.config/git/config 'external = .*/difft.*--color.*--display'
# Should NOT have difftool config when diffToolMode is explicitly false
assertFileNotRegex home-files/.config/git/config 'tool = "difftastic"'
assertFileNotRegex home-files/.config/git/config '\[difftool "difftastic"\]'
'';
}