mirror of
https://github.com/haskell-nix/hnix.git
synced 2024-09-19 02:37:44 +03:00
tests: Main: refactor
This commit is contained in:
parent
e0c13fea17
commit
eb86d91c7f
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user