summaryrefslogtreecommitdiff
path: root/Biz/Lint.hs
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2021-01-15 21:11:30 -0500
committerBen Sima <ben@bsima.me>2021-01-15 21:13:33 -0500
commite77cdc025b0e80049344f258d9ca170d0953d0d7 (patch)
tree71b1a438a8f715992627b644dcba7468ef036a09 /Biz/Lint.hs
parent7bb2775667386659402ebb7559c7bc4af46ec268 (diff)
Implement Biz.Test with tasty
Also changes the --test option to a 'test' command. This is because running the tests for a namespace/exe should never be combined with anything else: you either want to run the tests, or not.
Diffstat (limited to 'Biz/Lint.hs')
-rw-r--r--Biz/Lint.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/Biz/Lint.hs b/Biz/Lint.hs
index bad0806..bf7fa09 100644
--- a/Biz/Lint.hs
+++ b/Biz/Lint.hs
@@ -12,6 +12,8 @@ import Alpha
import qualified Biz.Cli as Cli
import Biz.Namespace (Ext (..), Namespace (..))
import qualified Biz.Namespace as Namespace
+import Biz.Test ((@=?))
+import qualified Biz.Test as Test
import qualified Control.Concurrent.Async as Async
import qualified Data.String as String
import qualified Data.Text as Text
@@ -31,8 +33,8 @@ move args =
[] -> changedFiles >>= run >>= mapM printResult >>= exit
files -> run (filter notcab files) >>= mapM printResult >>= exit
-test :: Cli.Arguments -> IO ()
-test _ = Exit.exitSuccess
+test :: Test.Tree
+test = Test.group "Biz.Bild" [Test.unit "id" <| 1 @=? 1]
notcab :: FilePath -> Bool
notcab ('_' : _) = False