We need them external the torrent package so we can test the API for adding dialers and listeners.
20 lines
259 B
Go
20 lines
259 B
Go
package torrent
|
|
|
|
import (
|
|
"log"
|
|
"os"
|
|
"testing"
|
|
)
|
|
|
|
func init() {
|
|
log.SetFlags(log.LstdFlags | log.Lshortfile)
|
|
}
|
|
|
|
func TestMain(m *testing.M) {
|
|
TestingTempDir.Init("torrent.test")
|
|
code := m.Run()
|
|
TestingTempDir.RemoveAll()
|
|
// select {}
|
|
os.Exit(code)
|
|
}
|