28 lines
411 B
Go
Raw Normal View History

2019-04-22 02:59:20 +00:00
package conf
import (
"flag"
"testing"
)
func TestInit(t *testing.T) {
flag.Set("conf", "../cmd/spy-service-test.toml")
flag.Parse()
var err error
if err = Init(); err != nil {
t.Fatal(err)
}
if Conf == nil {
t.Fatal()
}
if Conf.Property.Punishment == nil {
t.Fatal()
}
if Conf.Property.Score == nil {
t.Fatal()
}
t.Log(Conf.Property.AutoBlockSwitch)
t.Log(Conf.Property.White.Tels)
}