2018-12-07 18:21:23 +08:00
|
|
|
package imitater
|
2018-11-26 09:30:02 +08:00
|
|
|
|
|
|
|
import (
|
|
|
|
"regexp"
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/davecgh/go-spew/spew"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestNewYaml(t *testing.T) {
|
2018-12-06 14:44:10 +08:00
|
|
|
test := NewConfig("test.yaml")
|
|
|
|
data := spew.Sdump(test)
|
|
|
|
if !(regexp.MustCompile(`Device: \(string\) \(len=12\) "eson-OnePlus"`).MatchString(data) && regexp.MustCompile(`http://is.snssdk.com/2/article/information/v24/\?`).MatchString(data)) {
|
2018-11-26 09:30:02 +08:00
|
|
|
t.Error(data)
|
|
|
|
}
|
2018-12-06 14:44:10 +08:00
|
|
|
t.Error(data)
|
2018-11-26 09:30:02 +08:00
|
|
|
}
|
|
|
|
|
2018-11-27 17:46:29 +08:00
|
|
|
func TestCase(t *testing.T) {
|
2018-11-26 18:27:28 +08:00
|
|
|
}
|