summary refs log tree commit diff
path: root/nixos/tests/kbd-update-search-paths-patch.nix
blob: 2967ee489037635e01ef3723d634a099ac06fb87 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import ./make-test-python.nix ({ pkgs, ... }: {
  name = "kbd-update-search-paths-patch";

  machine = { pkgs, options, ... }: {
    console = {
      packages = options.console.packages.default ++ [ pkgs.terminus_font ];
    };
  };

  testScript = ''
    command = "${pkgs.kbd}/bin/setfont ter-112n 2>&1"
    (status, out) = machine.execute(command)
    pattern = re.compile(r".*Unable to find file:.*")
    match = pattern.match(out)
    if match:
        raise Exception("command `{}` failed".format(command))
  '';
})