You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

git_test.go 479B

12345678910111213141516171819202122232425
  1. // Copyright 2019 The Gitea Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package git
  5. import (
  6. "fmt"
  7. "os"
  8. "testing"
  9. )
  10. func fatalTestError(fmtStr string, args ...interface{}) {
  11. fmt.Fprintf(os.Stderr, fmtStr, args...)
  12. os.Exit(1)
  13. }
  14. func TestMain(m *testing.M) {
  15. if err := Init(); err != nil {
  16. fatalTestError("Init failed: %v", err)
  17. }
  18. exitStatus := m.Run()
  19. os.Exit(exitStatus)
  20. }