test bad json
This commit is contained in:
parent
0240a3fa3d
commit
a009c9ab2a
1 changed files with 8 additions and 0 deletions
|
@ -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 {.*}",
|
||||||
|
|
Loading…
Reference in a new issue