mirror of
https://github.com/nix-community/nixvim.git
synced 2025-08-03 17:45:03 +02:00
modules/test: allow arbitrary warning/assertion expecations
Allow defining expectation predicates that will be tested on the final warnings/assertions lists.
This commit is contained in:
parent
e7dcc9b518
commit
c2e172b0d3
2 changed files with 166 additions and 20 deletions
|
@ -38,7 +38,9 @@ linkFarmFromDrvs "failing-tests" [
|
|||
}
|
||||
''
|
||||
[[ 1 = $(cat "$failed/testBuildFailure.exit") ]]
|
||||
grep -F 'Unexpected warnings:' "$failed/testBuildFailure.log"
|
||||
grep -F 'Failed 1 expectation' "$failed/testBuildFailure.log"
|
||||
grep -F 'Expected length to be 0 but found 1.' "$failed/testBuildFailure.log"
|
||||
grep -F 'For warnings' "$failed/testBuildFailure.log"
|
||||
grep -F 'Hello, world!' "$failed/testBuildFailure.log"
|
||||
touch $out
|
||||
''
|
||||
|
@ -59,7 +61,9 @@ linkFarmFromDrvs "failing-tests" [
|
|||
}
|
||||
''
|
||||
[[ 1 = $(cat "$failed/testBuildFailure.exit") ]]
|
||||
grep -F 'Unexpected assertions:' "$failed/testBuildFailure.log"
|
||||
grep -F 'Failed 1 expectation' "$failed/testBuildFailure.log"
|
||||
grep -F 'Expected length to be 0 but found 1.' "$failed/testBuildFailure.log"
|
||||
grep -F 'For assertions' "$failed/testBuildFailure.log"
|
||||
grep -F 'Hello, world!' "$failed/testBuildFailure.log"
|
||||
touch $out
|
||||
''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue