return an exit code from TAP.run

the value 70 is EX_SOFTWARE from bsd's sysexits.h. i was looking for an
excuse to use 69 but alas it was not to be
This commit is contained in:
rhiannon morris 2022-04-27 15:04:10 +02:00
parent d062f79176
commit a690ca1277

View file

@ -6,6 +6,7 @@ import Data.String
import Data.List.Elem import Data.List.Elem
import Control.Monad.Reader import Control.Monad.Reader
import Control.Monad.State import Control.Monad.State
import System
public export Info : Type public export Info : Type
Info = List (String, String) Info = List (String, String)
@ -144,7 +145,9 @@ mutual
export export
run : List Test -> IO () run : List Test -> IO ExitCode
run tests = do run tests = do
putStrLn "TAP version 14" putStrLn "TAP version 14"
ignore $ runReaderT 0 $ runList tests pure $ if !(runReaderT 0 $ runList tests)
then ExitSuccess
else ExitFailure 70