-
-
Notifications
You must be signed in to change notification settings - Fork 270
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds a regression test for #2076. This test ensures that `extraConfigLua` is used in `finalPackage` and that the test will fail correctly when running `nvim` results in unexpected output.
- Loading branch information
1 parent
eac092c
commit 60ea38d
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
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 | ||
'' |