mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
tests.pkgs-lib.formats: Allow strings with context in test runner
This commit is contained in:
parent
08660ae7c5
commit
46156529f2
@ -18,8 +18,11 @@ let
|
|||||||
}) [ def ]);
|
}) [ def ]);
|
||||||
in formatSet.generate "test-format-file" config;
|
in formatSet.generate "test-format-file" config;
|
||||||
|
|
||||||
runBuildTest = name: { drv, expected }: pkgs.runCommand name {} ''
|
runBuildTest = name: { drv, expected }: pkgs.runCommand name {
|
||||||
if diff -u '${builtins.toFile "expected" expected}' '${drv}'; then
|
passAsFile = ["expected"];
|
||||||
|
inherit expected drv;
|
||||||
|
} ''
|
||||||
|
if diff -u "$expectedPath" "$drv"; then
|
||||||
touch "$out"
|
touch "$out"
|
||||||
else
|
else
|
||||||
echo
|
echo
|
||||||
|
Loading…
Reference in New Issue
Block a user