Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
asticode committed Jan 24, 2024
1 parent 3cd8177 commit c8c2af6
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions astiav_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,17 @@ import (
var globalHelper = newHelper()

func TestMain(m *testing.M) {
// Run
m.Run()
// Make sure to exit with the proper code
var code int
defer func(code *int) {
os.Exit(*code)
}(&code)

// Make sure to close global helper
globalHelper.close()
defer globalHelper.close()

// Exit
os.Exit(0)
// Run
code = m.Run()
}

type helper struct {
Expand Down

0 comments on commit c8c2af6

Please sign in to comment.