test bad json

This commit is contained in:
Nate Jones 2014-04-25 07:45:27 -07:00
parent 0240a3fa3d
commit a009c9ab2a

View file

@ -10,6 +10,14 @@ type RunTest struct {
regexps []string regexps []string
} }
func Test_BadJSON(t *testing.T) {
_, err := parseJSON([]byte(` "VirtualSize": 662553464, "Size": 662553464, "RepoTags": [ "<none>:<none>" ], "ParentId": "", "Id": "4c1208b690c68af3476b437e7bc2bcc460f062bda2094d2d8f21a7e70368d358", "Created": 1386114144 }]`))
if err == nil {
t.Error("invalid json did not cause an error")
}
}
func Test_Dot(t *testing.T) { func Test_Dot(t *testing.T) {
allMatch := []string{ allMatch := []string{
"(?s)digraph docker {.*}", "(?s)digraph docker {.*}",