fork/home-manager

git clone https://git.julia.blue/fork/home-manager

Robert Helgessontests: add option `test.stubs`cb09a968

master
737 B35 linesraw
1{ config, lib, pkgs, ... }:
2
3with lib;
4
5let
6  defpref = ''
7    defined through defaultPreferences
8  '';
9
10  autopref = ''
11    defined through automaticPreferences
12  '';
13
14in {
15  config = {
16    programs.ne = {
17      enable = true;
18      defaultPreferences = defpref;
19      automaticPreferences.".default" = autopref;
20    };
21
22    test.stubs.ne = { };
23
24    nmt = {
25      description =
26        "Check that it gracefully handles the case of both defaultPreferences and automaticPreferences.'.default' being set, defaulting to the former.";
27      script = ''
28        assertFileExists home-files/.ne/.default#ap
29        assertFileContent home-files/.ne/.default#ap ${
30          builtins.toFile "defpref" defpref
31        }
32      '';
33    };
34  };
35}