20 lines
324 B
Go
20 lines
324 B
Go
package imitater
|
|
|
|
import (
|
|
"regexp"
|
|
"testing"
|
|
|
|
"github.com/davecgh/go-spew/spew"
|
|
)
|
|
|
|
func TestNewYaml(t *testing.T) {
|
|
test := NewConfig("test.yaml")
|
|
data := spew.Sdump(test)
|
|
if !regexp.MustCompile(`Device: \(string\) \(len=12\) "eson-OnePlus"`).MatchString(data) {
|
|
t.Error(data)
|
|
}
|
|
}
|
|
|
|
func TestCase(t *testing.T) {
|
|
}
|