1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-14 13:01:09 +01:00

tests/difftastic: add

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
Austin Horstman 2025-10-16 21:11:59 -05:00
parent 111329b475
commit 4166d4e163
6 changed files with 128 additions and 0 deletions

View file

@ -0,0 +1,25 @@
{
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"\]'
'';
}