1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 19:46:05 +01:00

tests: avoid unnecessary test script interpolation

This commit is contained in:
Robert Helgesson 2025-02-04 00:39:34 +01:00
parent 1e47f7101f
commit 24bb01ea17
No known key found for this signature in database
GPG key ID: 96E745BD17AA17ED

View file

@ -44,17 +44,16 @@ with lib;
-- --
'' config.warnings; '' config.warnings;
"asserts/warnings.expected".text = concatStringsSep ''
--
'' config.test.asserts.warnings.expected;
}; };
nmt.script = '' nmt.script = ''
assertFileContent \ assertFileContent \
home-files/asserts/warnings.actual \ home-files/asserts/warnings.actual \
${ "$TESTED/home-files/asserts/warnings.expected"
pkgs.writeText "warnings.expected" (concatStringsSep ''
--
'' config.test.asserts.warnings.expected)
}
''; '';
}) })
@ -64,17 +63,16 @@ with lib;
-- --
'' (map (x: x.message) (filter (x: !x.assertion) config.assertions)); '' (map (x: x.message) (filter (x: !x.assertion) config.assertions));
"asserts/assertions.expected".text = concatStringsSep ''
--
'' config.test.asserts.assertions.expected;
}; };
nmt.script = '' nmt.script = ''
assertFileContent \ assertFileContent \
home-files/asserts/assertions.actual \ home-files/asserts/assertions.actual \
${ "$TESTED/home-files/asserts/assertions.expected"
pkgs.writeText "assertions.expected" (concatStringsSep ''
--
'' config.test.asserts.assertions.expected)
}
''; '';
}) })
]; ];