gb.test: Exit with appropriate status code
[GB.TEST] * BUG: Test.Main() now `Quit`s with 0 or 1 indicating whether tests passed or failed.
This commit is contained in:
parent
a965afa0e5
commit
e3a9ac58e8
1 changed files with 7 additions and 0 deletions
|
@ -39,6 +39,7 @@ Public Sub Main(Optional Tests As String)
|
|||
Test._Reset() ' only if you run this Main multiple times per process, which you shouldn't
|
||||
RunTests(Tests)
|
||||
PrintSummary()
|
||||
Quit ExitCode()
|
||||
|
||||
End
|
||||
|
||||
|
@ -60,6 +61,12 @@ Private Sub PrintSummary()
|
|||
|
||||
End
|
||||
|
||||
Private Function ExitCode() As Integer
|
||||
|
||||
Return IIf($hPrinter.Session.Summary.Success, 0, 1)
|
||||
|
||||
End
|
||||
|
||||
'' Prints a Collection[] of tests as returned by FindFailures, FindSkips, FindTodos.
|
||||
'' _Description_ can contain '&1' which is substituted for _TestCollection_.Count.
|
||||
Private Sub ShowTestCollection(Description As String, TestCollection As Collection[])
|
||||
|
|
Loading…
Reference in a new issue