mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-07 06:19:00 +00:00
tests/modules/home-manager: init programs.pop-launcher
This commit is contained in:
parent
9577f5a4f7
commit
a65a0a3982
@ -52,5 +52,6 @@ import nmt {
|
||||
testedAttrPath = [ "home" "activationPackage" ];
|
||||
tests = builtins.foldl' (a: b: a // (import b)) { } [
|
||||
./programs/neovide
|
||||
./programs/pop-launcher
|
||||
];
|
||||
}
|
||||
|
36
tests/modules/home-manager/programs/pop-launcher/basic.nix
Normal file
36
tests/modules/home-manager/programs/pop-launcher/basic.nix
Normal file
@ -0,0 +1,36 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.pop-launcher = {
|
||||
enable = true;
|
||||
plugins = with pkgs; [
|
||||
pop-launcher-plugin-duckduckgo-bangs
|
||||
pop-launcher-plugin-brightness
|
||||
];
|
||||
};
|
||||
|
||||
test.stubs = {
|
||||
pop-launcher = { };
|
||||
pop-launcher-plugin-duckduckgo-bangs = {
|
||||
outPath = null;
|
||||
buildScript = ''
|
||||
mkdir -p $out/share/pop-launcher/{scripts,plugins/bangs}
|
||||
echo "hello" | tee "$out/share/pop-launcher/plugins/bangs/bangs"
|
||||
echo "WHOA" | tee "$out/share/pop-launcher/scripts/whoa"
|
||||
'';
|
||||
};
|
||||
pop-launcher-plugin-brightness = {
|
||||
outPath = null;
|
||||
buildScript = ''
|
||||
mkdir -p "$out/share/pop-launcher/plugins/brightness"
|
||||
echo "world" | tee "$out/share/pop-launcher/plugins/brightness/brightness"
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.local/share/pop-launcher/plugins/bangs/bangs
|
||||
assertFileExists home-files/.local/share/pop-launcher/scripts/whoa
|
||||
assertFileExists home-files/.local/share/pop-launcher/plugins/brightness/brightness
|
||||
'';
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
pop-launcher-basic = ./basic.nix;
|
||||
pop-launcher-empty = ./empty.nix;
|
||||
}
|
11
tests/modules/home-manager/programs/pop-launcher/empty.nix
Normal file
11
tests/modules/home-manager/programs/pop-launcher/empty.nix
Normal file
@ -0,0 +1,11 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.pop-launcher.enable = true;
|
||||
|
||||
test.stubs.pop-launcher = { };
|
||||
|
||||
nmt.script = ''
|
||||
assertDirectoryEmpty home-files/.local/share/pop-launcher
|
||||
'';
|
||||
}
|
Loading…
Reference in New Issue
Block a user