File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11/-! Integration tests for the Ix CLI -/
22
3- def Tests.Cli.run (buildCmd: String) (buildArgs : Array String) (buildDir : Option System.FilePath) : IO UInt32 := do
3+ def Tests.Cli.run (buildCmd: String) (buildArgs : Array String) (buildDir : Option System.FilePath) : IO Unit := do
44 let proc : IO.Process.SpawnArgs :=
55 match buildDir with
66 | some bd => { cmd := buildCmd, args := buildArgs, cwd := bd }
77 | none => { cmd := buildCmd, args := buildArgs }
88 let out ← IO.Process.output proc
99 if out.exitCode ≠ 0 then
1010 IO.eprintln out.stderr
11+ throw $ IO.userError out.stderr
1112 else
1213 IO.println out.stdout
13- return out.exitCode
1414
1515def Tests.Cli.suite : IO UInt32 := do
16- let _install ← Tests.Cli.run "lake" (#["run" , "install" ]) none
16+ Tests.Cli.run "lake" (#["run" , "install" ]) none
1717 let ixTestDir := (← IO.currentDir) / "ix_test"
18- let _store ← Tests.Cli.run "ix" (#["store" , "IxTest.lean" ]) (some ixTestDir)
19- let _prove ← Tests.Cli.run "ix" (#["prove" , "IxTest.lean" , "one" ]) (some ixTestDir)
18+ Tests.Cli.run "ix" (#["store" , "IxTest.lean" ]) (some ixTestDir)
19+ Tests.Cli.run "ix" (#["prove" , "IxTest.lean" , "one" ]) (some ixTestDir)
2020 return 0
You can’t perform that action at this time.
0 commit comments