tests: add support for asserting warnings

This adds a "test.asserts" module that currently just provides a
convenient way to assert on the content of warnings. By default all
tests will assert that no warnings are given.
This commit is contained in:
Robert Helgesson 2020-12-30 17:20:47 +01:00
parent 4dedfcfd95
commit 9d53afb709
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
7 changed files with 64 additions and 1 deletions

View file

@ -14,6 +14,12 @@ with lib;
userName = "John Doe";
};
test.asserts.warnings.expected = [''
Using programs.git.extraConfig as a string option is
deprecated and will be removed in the future. Please
change to using it as an attribute set instead.
''];
nmt.script = ''
assertFileExists home-files/.config/git/config
assertFileContent home-files/.config/git/config \