本站源代码
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.

26 line
479B

  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. }
上海开阖软件有限公司 沪ICP备12045867号-1