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-difftool.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
800 B
Nix

{
programs.difftastic = {
enable = true;
git = {
enable = true;
diffToolMode = true;
};
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 BOTH diff.external AND difftool config when diffToolMode is true
assertFileRegex home-files/.config/git/config 'external = .*/difft.*--color.*--display'
assertFileRegex home-files/.config/git/config 'tool = "difftastic"'
assertFileContains home-files/.config/git/config '[difftool "difftastic"]'
assertFileRegex home-files/.config/git/config 'cmd = .*/difft.*--color.*--display.*\$LOCAL \$REMOTE'
'';
}