2016-07-10 12:58:43 +00:00
|
|
|
package torrent
|
|
|
|
|
|
|
|
import (
|
2017-09-18 02:14:16 +00:00
|
|
|
"log"
|
2016-07-10 12:58:43 +00:00
|
|
|
"os"
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
2017-09-18 02:14:16 +00:00
|
|
|
func init() {
|
2018-02-11 04:14:31 +00:00
|
|
|
log.SetFlags(log.LstdFlags | log.Lshortfile)
|
2017-11-07 05:00:08 +00:00
|
|
|
}
|
|
|
|
|
2016-07-10 12:58:43 +00:00
|
|
|
func TestMain(m *testing.M) {
|
2020-02-20 02:57:24 +00:00
|
|
|
TestingTempDir.Init("torrent.test")
|
2016-07-10 12:58:43 +00:00
|
|
|
code := m.Run()
|
2020-02-20 02:57:24 +00:00
|
|
|
TestingTempDir.RemoveAll()
|
2016-07-10 12:58:43 +00:00
|
|
|
// select {}
|
|
|
|
os.Exit(code)
|
|
|
|
}
|