mirror of
https://github.com/nix-community/home-manager
synced 2024-11-26 21:19:45 +01:00
kakoune: clean up tests
- Enable use-plugins test. - Stub out `kakoune-unwrapped` to avoid unnecessary downloads. - Unwrap unnecessary `config` attributes.
This commit is contained in:
parent
c678162e20
commit
2917ef23b3
6 changed files with 61 additions and 51 deletions
|
@ -1,8 +1,6 @@
|
|||
{
|
||||
kakoune-no-plugins = ./no-plugins.nix;
|
||||
# Temporarily disabled until https://github.com/NixOS/nixpkgs/pull/110196
|
||||
# reaches the unstable channel.
|
||||
# kakoune-use-plugins = ./use-plugins.nix;
|
||||
kakoune-use-plugins = ./use-plugins.nix;
|
||||
kakoune-whitespace-highlighter = ./whitespace-highlighter.nix;
|
||||
kakoune-whitespace-highlighter-corner-cases =
|
||||
./whitespace-highlighter-corner-cases.nix;
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
with lib;
|
||||
|
||||
{
|
||||
config = {
|
||||
imports = [ ./stubs.nix ];
|
||||
|
||||
programs.kakoune = { enable = true; };
|
||||
|
||||
nmt.script = ''
|
||||
assertPathNotExists home-path/share/kak/autoload/plugins
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
12
tests/modules/programs/kakoune/stubs.nix
Normal file
12
tests/modules/programs/kakoune/stubs.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
test.stubs.kakoune-unwrapped = {
|
||||
name = "dummy-kakoune";
|
||||
version = "1";
|
||||
outPath = null;
|
||||
buildScript = ''
|
||||
mkdir -p $out/bin $out/share/kak/doc
|
||||
touch $out/bin/kak
|
||||
chmod +x $out/bin/kak
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -3,14 +3,14 @@
|
|||
with lib;
|
||||
|
||||
{
|
||||
config = {
|
||||
imports = [ ./stubs.nix ];
|
||||
|
||||
programs.kakoune = {
|
||||
enable = true;
|
||||
plugins = [ pkgs.kakounePlugins.kak-prelude ];
|
||||
plugins = [ pkgs.kakounePlugins.prelude-kak ];
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertDirectoryNotEmpty home-path/share/kak/autoload/plugins
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
with lib;
|
||||
|
||||
{
|
||||
config = {
|
||||
imports = [ ./stubs.nix ];
|
||||
|
||||
programs.kakoune = {
|
||||
enable = true;
|
||||
config.showWhitespace = {
|
||||
|
@ -21,5 +22,4 @@ with lib;
|
|||
assertFileContains home-files/.config/kak/kakrc \
|
||||
"add-highlighter global/ show-whitespaces -tab \"'\" -spc ' ' -nbsp ' ' -lf '\"'"
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
with lib;
|
||||
|
||||
{
|
||||
config = {
|
||||
imports = [ ./stubs.nix ];
|
||||
|
||||
programs.kakoune = {
|
||||
enable = true;
|
||||
config.showWhitespace = {
|
||||
|
@ -21,5 +22,4 @@ with lib;
|
|||
assertFileContains home-files/.config/kak/kakrc \
|
||||
"add-highlighter global/ show-whitespaces -tab '4' -tabpad '5' -spc '2' -nbsp '3' -lf '1'"
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue