2022-04-26 12:17:59 -04:00
|
|
|
module Tests
|
|
|
|
|
2022-05-01 18:19:09 -04:00
|
|
|
import Options
|
|
|
|
import TAP
|
|
|
|
import Tests.Lexer
|
2022-05-06 15:58:32 -04:00
|
|
|
import Tests.Parser
|
2022-04-27 14:06:39 -04:00
|
|
|
import Tests.Equal
|
2022-05-01 18:19:09 -04:00
|
|
|
import System
|
2022-04-27 14:06:39 -04:00
|
|
|
|
2022-04-26 12:17:59 -04:00
|
|
|
|
2022-05-02 11:13:13 -04:00
|
|
|
allTests = [
|
|
|
|
Lexer.tests,
|
2022-05-06 15:58:32 -04:00
|
|
|
Parser.tests,
|
2022-05-06 15:23:58 -04:00
|
|
|
Equal.tests
|
2022-05-02 11:13:13 -04:00
|
|
|
]
|
2022-04-27 14:06:39 -04:00
|
|
|
|
2022-05-01 18:19:09 -04:00
|
|
|
main = do
|
|
|
|
opts <- getTestOpts
|
|
|
|
go <- case opts.tapVersion of
|
|
|
|
"13" => pure TAP.mainFlat
|
|
|
|
"14" => pure TAP.main
|
2022-05-04 11:09:49 -04:00
|
|
|
_ => do putStrLn "unrecognised TAP version; use 13 or 14"; exitFailure
|
2022-05-01 18:19:09 -04:00
|
|
|
go allTests
|