mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-12 01:59:37 +08:00
git: add tests for difftastic
This commit is contained in:
committed by
Austin Horstman
parent
e46b52ab56
commit
d328666dba
@@ -10,4 +10,5 @@
|
||||
git-with-hooks = ./git-with-hooks.nix;
|
||||
git-with-maintenance = ./git-with-maintenance.nix;
|
||||
git-patdiff = ./git-patdiff.nix;
|
||||
git-difftastic = ./git-difftastic.nix;
|
||||
}
|
||||
|
||||
12
tests/modules/programs/git/git-difftastic-expected.conf
Normal file
12
tests/modules/programs/git/git-difftastic-expected.conf
Normal file
@@ -0,0 +1,12 @@
|
||||
[diff]
|
||||
external = "@difftastic@/bin/difft --color always --background dark --display inline"
|
||||
tool = "difftastic"
|
||||
|
||||
[difftool "difftastic"]
|
||||
cmd = "@difftastic@/bin/difft --color always --background dark --display inline $LOCAL $REMOTE"
|
||||
|
||||
[gpg]
|
||||
format = "openpgp"
|
||||
|
||||
[gpg "openpgp"]
|
||||
program = "path-to-gpg"
|
||||
18
tests/modules/programs/git/git-difftastic.nix
Normal file
18
tests/modules/programs/git/git-difftastic.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
signing.signer = "path-to-gpg";
|
||||
difftastic = {
|
||||
enable = true;
|
||||
enableAsDifftool = true;
|
||||
background = "dark";
|
||||
color = "always";
|
||||
display = "inline";
|
||||
};
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/git/config
|
||||
assertFileContent home-files/.config/git/config ${./git-difftastic-expected.conf}
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user