summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2022-08-03 18:06:32 -0400
committerBen Sima <ben@bsima.me>2022-08-03 18:06:32 -0400
commit7b89187e865716bd20bf41c998e30bc91fa3f0b7 (patch)
treed6151cc280795cbe714b430020a1f5ebff6ee809
parentbe7089b9f1cee330bc5973431b0d45dee840b46d (diff)
Fix bild test
-rw-r--r--Biz/Bild.hs19
1 files changed, 11 insertions, 8 deletions
diff --git a/Biz/Bild.hs b/Biz/Bild.hs
index 2113b5a..8e64e43 100644
--- a/Biz/Bild.hs
+++ b/Biz/Bild.hs
@@ -139,14 +139,17 @@ main = Cli.main <| Cli.Plan help move test_ pure
"Biz.Bild"
[ Test.unit "can bild bild" <| do
root <- Env.getEnv "BIZ_ROOT"
- let Just ns = Namespace.fromPath root "Biz/Bild.hs"
- analyze mempty ns
- +> build False False
- +> \case
- [Exit.ExitFailure _] ->
- Test.assertFailure "can't bild bild"
- _ ->
- pure ()
+ path <- Dir.makeAbsolute "Biz/Bild.hs"
+ case Namespace.fromPath root path of
+ Nothing -> Test.assertFailure "can't find ns for bild"
+ Just ns ->
+ analyze mempty ns
+ +> build False False
+ +> \case
+ [Exit.ExitFailure _] ->
+ Test.assertFailure "can't bild bild"
+ _ ->
+ pure ()
]
move :: Cli.Arguments -> IO ()