mirror of
https://github.com/nix-community/home-manager
synced 2024-11-26 21:19:45 +01:00
process-compose: add shortcuts test
This commit is contained in:
parent
c739322dec
commit
e0336ad244
4 changed files with 27 additions and 0 deletions
|
@ -127,6 +127,7 @@ in import nmtSrc {
|
|||
./modules/programs/powerline-go
|
||||
./modules/programs/pubs
|
||||
./modules/programs/pyenv
|
||||
./modules/programs/process-compose
|
||||
./modules/programs/qcal
|
||||
./modules/programs/qutebrowser
|
||||
./modules/programs/ranger
|
||||
|
|
1
tests/modules/programs/process-compose/default.nix
Normal file
1
tests/modules/programs/process-compose/default.nix
Normal file
|
@ -0,0 +1 @@
|
|||
{ process-compose-shortcuts = ./shortcuts.nix; }
|
22
tests/modules/programs/process-compose/shortcuts.nix
Normal file
22
tests/modules/programs/process-compose/shortcuts.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
config = {
|
||||
programs.process-compose = {
|
||||
enable = true;
|
||||
package = pkgs.writeScriptBin "dummy-process-compose" "";
|
||||
shortcuts = { help.shortcut = "?"; };
|
||||
};
|
||||
|
||||
nmt.script = let
|
||||
configDir = if pkgs.stdenv.isDarwin then
|
||||
"home-files/Library/Application Support/process-compose"
|
||||
else
|
||||
"home-files/.config/process-compose";
|
||||
in ''
|
||||
shortcutsFile="${configDir}/shortcuts.yaml"
|
||||
assertFileExists "$shortcutsFile"
|
||||
assertFileContent "$shortcutsFile" "${./shortcuts.yaml}"
|
||||
'';
|
||||
};
|
||||
}
|
3
tests/modules/programs/process-compose/shortcuts.yaml
Normal file
3
tests/modules/programs/process-compose/shortcuts.yaml
Normal file
|
@ -0,0 +1,3 @@
|
|||
shortcuts:
|
||||
help:
|
||||
shortcut: '?'
|
Loading…
Reference in a new issue