parent
4fe5afa755
commit
4b702bf6b7
14 changed files with 282 additions and 0 deletions
4
tests/modules/programs/ncmpcpp/default.nix
Normal file
4
tests/modules/programs/ncmpcpp/default.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
ncmpcpp-empty-settings = ./ncmpcpp-empty-settings.nix;
|
||||
ncmpcpp-example-settings = ./ncmpcpp-example-settings.nix;
|
||||
}
|
||||
16
tests/modules/programs/ncmpcpp/ncmpcpp-empty-settings.nix
Normal file
16
tests/modules/programs/ncmpcpp/ncmpcpp-empty-settings.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
config = {
|
||||
programs.ncmpcpp.enable = true;
|
||||
|
||||
nixpkgs.overlays =
|
||||
[ (self: super: { ncmpcpp = pkgs.writeScriptBin "dummy-ncmpcpp" ""; }) ];
|
||||
|
||||
nmt.script = ''
|
||||
assertPathNotExists home-files/.config/ncmpcpp/config
|
||||
|
||||
assertPathNotExists home-files/.config/ncmpcpp/bindings
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
def_key "j"
|
||||
scroll_down
|
||||
def_key "k"
|
||||
scroll_up
|
||||
def_key "J"
|
||||
select_item
|
||||
scroll_down
|
||||
def_key "K"
|
||||
select_item
|
||||
scroll_up
|
||||
def_key "x"
|
||||
delete_playlist_items
|
||||
def_key "x"
|
||||
delete_browser_items
|
||||
def_key "x"
|
||||
delete_stored_playlist
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
display_volume_level=no
|
||||
mpd_music_dir=/home/user/music
|
||||
playlist_disable_highlight_delay=0
|
||||
user_interface=alternative
|
||||
60
tests/modules/programs/ncmpcpp/ncmpcpp-example-settings.nix
Normal file
60
tests/modules/programs/ncmpcpp/ncmpcpp-example-settings.nix
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
config = {
|
||||
programs.ncmpcpp = {
|
||||
enable = true;
|
||||
mpdMusicDir = "/home/user/music";
|
||||
|
||||
settings = {
|
||||
user_interface = "alternative";
|
||||
display_volume_level = false;
|
||||
playlist_disable_highlight_delay = 0;
|
||||
};
|
||||
|
||||
bindings = [
|
||||
{
|
||||
key = "j";
|
||||
command = "scroll_down";
|
||||
}
|
||||
{
|
||||
key = "k";
|
||||
command = "scroll_up";
|
||||
}
|
||||
{
|
||||
key = "J";
|
||||
command = [ "select_item" "scroll_down" ];
|
||||
}
|
||||
{
|
||||
key = "K";
|
||||
command = [ "select_item" "scroll_up" ];
|
||||
}
|
||||
{
|
||||
key = "x";
|
||||
command = "delete_playlist_items";
|
||||
}
|
||||
{
|
||||
key = "x";
|
||||
command = "delete_browser_items";
|
||||
}
|
||||
{
|
||||
key = "x";
|
||||
command = "delete_stored_playlist";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
nixpkgs.overlays =
|
||||
[ (self: super: { ncmpcpp = pkgs.writeScriptBin "dummy-ncmpcpp" ""; }) ];
|
||||
|
||||
nmt.script = ''
|
||||
assertFileContent \
|
||||
home-files/.config/ncmpcpp/config \
|
||||
${./ncmpcpp-example-settings-expected-config}
|
||||
|
||||
assertFileContent \
|
||||
home-files/.config/ncmpcpp/bindings \
|
||||
${./ncmpcpp-example-settings-expected-bindings}
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue