mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-12 01:59:37 +08:00
delta: add test where git integration is disabled
This commit is contained in:
committed by
Austin Horstman
parent
84e1adb0cd
commit
aa559a682b
@@ -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
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user