tests: Main: refactor

This commit is contained in:
Anton-Latukha 2022-01-27 00:06:34 +02:00
parent e0c13fea17
commit eb86d91c7f
No known key found for this signature in database
GPG Key ID: 3D84C07E91802E41

View File

@ -66,15 +66,13 @@ ensureNixpkgsCanParse =
(errorWithoutStackTrace $
"Directory " <> show dir <> " does not have any files")
(traverse_
(\ file ->
let fileIsNotSuffix = not `isSuffixOf` file in
(\ path ->
let notEndsIn suffix = not $ isSuffixOf suffix path in
when
(on (&&) fileIsNotSuffix "azure-cli/default.nix" "os-specific/linux/udisks/2-default.nix")
$ do
-- Parse and deepseq the resulting expression tree, to ensure the
-- parser is fully executed.
_ <- consider (coerce file) (parseNixFileLoc (coerce file)) $ Exc.evaluate . force
stub
(on (&&) notEndsIn "azure-cli/default.nix" "os-specific/linux/udisks/2-default.nix")
$ -- Parse and deepseq the resulting expression tree, to ensure the
-- parser is fully executed.
mempty <$ consider (coerce path) (parseNixFileLoc (coerce path)) $ Exc.evaluate . force
)
)
files