2023-05-22 11:47:46 -07:00
|
|
|
|
import LSpec
|
2023-12-26 09:22:57 -08:00
|
|
|
|
import Test.Environment
|
2023-08-13 21:19:06 -07:00
|
|
|
|
import Test.Integration
|
2024-03-31 16:43:30 -07:00
|
|
|
|
import Test.Library
|
|
|
|
|
import Test.Metavar
|
2023-05-22 14:49:56 -07:00
|
|
|
|
import Test.Proofs
|
|
|
|
|
import Test.Serial
|
2023-05-22 11:47:46 -07:00
|
|
|
|
|
2023-05-22 14:49:56 -07:00
|
|
|
|
open Pantograph.Test
|
2023-05-22 11:47:46 -07:00
|
|
|
|
|
2024-04-06 14:07:13 -07:00
|
|
|
|
def main (args: List String) := do
|
|
|
|
|
let name_filter := args.head?
|
2023-05-22 14:49:56 -07:00
|
|
|
|
Lean.initSearchPath (← Lean.findSysroot)
|
2024-04-06 14:07:13 -07:00
|
|
|
|
let env_default: Lean.Environment ← Lean.importModules
|
|
|
|
|
(imports := #[`Init])
|
|
|
|
|
(opts := {})
|
|
|
|
|
(trustLevel := 1)
|
2023-05-22 14:49:56 -07:00
|
|
|
|
|
2024-04-06 14:07:13 -07:00
|
|
|
|
let suites: List (String × List (String × IO LSpec.TestSeq)) := [
|
|
|
|
|
("Environment", Environment.suite),
|
|
|
|
|
("Integration", Integration.suite),
|
|
|
|
|
("Library", Library.suite env_default),
|
|
|
|
|
("Metavar", Metavar.suite env_default),
|
|
|
|
|
("Proofs", Proofs.suite env_default),
|
|
|
|
|
("Serial", Serial.suite env_default),
|
2023-05-22 14:49:56 -07:00
|
|
|
|
]
|
2024-04-06 14:07:13 -07:00
|
|
|
|
let tests: List (String × IO LSpec.TestSeq) := suites.foldl (λ acc (name, suite) => acc ++ (addPrefix name suite)) []
|
|
|
|
|
LSpec.lspecIO (← runTestGroup name_filter tests)
|