imitater/execute_test.go
2018-11-27 17:46:29 +08:00

19 lines
463 B
Go

package imitate
import (
"regexp"
"testing"
"github.com/davecgh/go-spew/spew"
)
func TestNewYaml(t *testing.T) {
data := spew.Sdump(NewConfig("test.yaml"))
if !(regexp.MustCompile(`Device: \(string\) \(len=12\) "eson-OnePlus"`).MatchString(data) && regexp.MustCompile(`Sec: \(int\) 30`).MatchString(data) && regexp.MustCompile(`http://is.snssdk.com/2/article/information/v24/\?`).MatchString(data)) {
t.Error(data)
}
}
func TestCase(t *testing.T) {
}