imitater/execute_test.go

19 lines
463 B
Go
Raw Normal View History

2018-11-26 01:30:02 +00:00
package imitate
import (
"regexp"
"testing"
"github.com/davecgh/go-spew/spew"
)
func TestNewYaml(t *testing.T) {
data := spew.Sdump(NewConfig("test.yaml"))
2018-11-26 10:27:28 +00:00
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)) {
2018-11-26 01:30:02 +00:00
t.Error(data)
}
}
2018-11-27 09:46:29 +00:00
func TestCase(t *testing.T) {
2018-11-26 10:27:28 +00:00
}