tests: allow testing assertions

By default tests are expected to produce no assertion.

This also updates the existing tests to match.
This commit is contained in:
Robert Helgesson 2021-02-07 21:52:16 +01:00
parent bdee1be7b3
commit ef4370bedc
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
22 changed files with 102 additions and 85 deletions

View file

@ -1 +0,0 @@
["Cannot use the rofi options 'theme' and 'colors' simultaneously.\n"]

View file

@ -17,16 +17,11 @@ with lib;
};
};
home.file.result.text = builtins.toJSON
(map (a: a.message) (filter (a: !a.assertion) config.assertions));
nixpkgs.overlays =
[ (self: super: { rofi = pkgs.writeScriptBin "dummy-rofi" ""; }) ];
nmt.script = ''
assertFileContent \
home-files/result \
${./assert-on-both-theme-and-colors-expected.json}
'';
test.asserts.assertions.expected = [''
Cannot use the rofi options 'theme' and 'colors' simultaneously.
''];
};
}