1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-09 04:39:44 +01:00
home-manager/tests/modules/programs/lf/no-pv-keybind.nix
Robert Helgesson cb09a968e9
tests: add option test.stubs
This option provides a more convenient way to overlay dummy packages.
It also adds a function `config.lib.test.mkStubPackage` that can,
e.g., be used for `package` options.
2021-09-26 23:26:38 +02:00

42 lines
555 B
Nix

{ config, lib, pkgs, ... }:
with lib;
let
pvScript = builtins.toFile "pv.sh" "cat $1";
expected = builtins.toFile "settings-expected" ''
set previewer ${pvScript}
# More config...
'';
in {
config = {
programs.lf = {
enable = true;
extraConfig = ''
# More config...
'';
previewer = { source = pvScript; };
};
test.stubs.lf = { };
nmt.script = ''
assertFileExists home-files/.config/lf/lfrc
assertFileContent home-files/.config/lf/lfrc ${expected}
'';
};
}