2018-12-07 10:21:23 +00:00
|
|
|
package imitater
|
2018-11-26 01:30:02 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
"regexp"
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/davecgh/go-spew/spew"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestNewYaml(t *testing.T) {
|
2018-12-06 06:44:10 +00:00
|
|
|
test := NewConfig("test.yaml")
|
|
|
|
data := spew.Sdump(test)
|
2018-12-18 07:33:57 +00:00
|
|
|
if !regexp.MustCompile(`Device: \(string\) \(len=12\) "eson-OnePlus"`).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
|
|
|
}
|