mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
23 lines
488 B
Nix
23 lines
488 B
Nix
|
{
|
||
|
pkgs,
|
||
|
mkTestDerivationFromNixvimModule,
|
||
|
}:
|
||
|
let
|
||
|
inherit (pkgs.testers) testBuildFailure;
|
||
|
|
||
|
failed = testBuildFailure (mkTestDerivationFromNixvimModule {
|
||
|
name = "prints-hello-world";
|
||
|
module = {
|
||
|
extraConfigLua = ''
|
||
|
print('Hello, world!')
|
||
|
'';
|
||
|
};
|
||
|
inherit pkgs;
|
||
|
});
|
||
|
in
|
||
|
pkgs.runCommand "failing-test" { inherit failed; } ''
|
||
|
grep -F 'Hello, world!' "$failed/testBuildFailure.log"
|
||
|
[[ 1 = $(cat "$failed/testBuildFailure.exit") ]]
|
||
|
touch $out
|
||
|
''
|