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:
parent
111329b475
commit
4166d4e163
6 changed files with 128 additions and 0 deletions
|
|
@ -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"\]'
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue