support TAP 13 for /usr/bin/prove's benefit

13 doesn't support test trees so we gotta flatten it >:(
This commit is contained in:
rhiannon morris 2022-05-02 00:19:09 +02:00
parent cf119694c1
commit e3384d4e6e
4 changed files with 100 additions and 12 deletions

View file

@ -1,11 +1,18 @@
module Tests
import Tests.Equal
import Options
import TAP
import Tests.Lexer
import Tests.Equal
import System
export main : IO Int
main = exitWith =<< run
[Equal.tests]
allTests = [Equal.tests]
main = do
opts <- getTestOpts
go <- case opts.tapVersion of
"13" => pure TAP.mainFlat
"14" => pure TAP.main
_ => die "unrecognised TAP version; use 13 or 14"
go allTests