From e77cdc025b0e80049344f258d9ca170d0953d0d7 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Fri, 15 Jan 2021 21:11:30 -0500 Subject: 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. --- Biz/Lint.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Biz/Lint.hs') 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 -- cgit v1.2.3