fork/home-manager

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

Robert Helgessontests: add support for asserting warnings9d53afb7

master
688 B29 linesraw
1{ config, lib, pkgs, ... }:
2
3with lib;
4
5{
6  config = {
7    programs.git = {
8      enable = true;
9      package = pkgs.gitMinimal;
10      extraConfig = ''
11        This can be anything.
12      '';
13      userEmail = "user@example.org";
14      userName = "John Doe";
15    };
16
17    test.asserts.warnings.expected = [''
18      Using programs.git.extraConfig as a string option is
19      deprecated and will be removed in the future. Please
20      change to using it as an attribute set instead.
21    ''];
22
23    nmt.script = ''
24      assertFileExists home-files/.config/git/config
25      assertFileContent home-files/.config/git/config \
26        ${./git-with-str-extra-config-expected.conf}
27    '';
28  };
29}