mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 11:36:05 +01:00
delta: add test where git integration is disabled
This commit is contained in:
parent
84e1adb0cd
commit
aa559a682b
3 changed files with 26 additions and 0 deletions
|
|
@ -2,5 +2,6 @@
|
|||
delta-basic = ./delta-basic.nix;
|
||||
delta-final-package = ./delta-final-package.nix;
|
||||
delta-with-git-integration = ./delta-with-git-integration.nix;
|
||||
delta-without-git-integration = ./delta-without-git-integration.nix;
|
||||
delta-migration = ./delta-migration.nix;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,5 +28,8 @@
|
|||
assertFileContains home-files/.config/git/config 'commit-decoration-style = "bold yellow box ul"'
|
||||
assertFileContains home-files/.config/git/config 'file-decoration-style = "none"'
|
||||
assertFileContains home-files/.config/git/config 'file-style = "bold yellow ul"'
|
||||
|
||||
# the wrapper should be created only if git integration is disabled
|
||||
assertPathNotExists home-path/bin/.delta-wrapped
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
programs.delta = {
|
||||
enable = true;
|
||||
enableGitIntegration = false;
|
||||
package = config.lib.test.mkStubPackage {
|
||||
name = "delta";
|
||||
buildScript = /* sh */ ''
|
||||
mkdir -p $out/bin
|
||||
echo "#!/bin/sh" > $out/bin/delta
|
||||
chmod +x $out/bin/delta
|
||||
'';
|
||||
};
|
||||
options.features = "line-numbers decorations";
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertPathNotExists home-files/.config/git/config
|
||||
# the wrapper should be created only if git integration is disabled
|
||||
assertFileExists home-path/bin/.delta-wrapped
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue