parser/gotest: Add test 31

This commit is contained in:
Joël Stemmer 2019-10-05 19:20:06 +01:00
parent 84801b696c
commit 29fc9e3974

View File

@ -426,7 +426,29 @@ var tests = []struct {
{Type: "summary", Result: "ok", Name: "sixteen/cpu", Duration: 1522 * time.Millisecond},
}},
{"30-stdout", []gtr.Event{}},
{"31-syntax-error-test-binary", []gtr.Event{}},
{"31-syntax-error-test-binary",
[]gtr.Event{
{Type: "output", Data: "# package/name/failing1 [package/name/failing1.test]"},
{Type: "output", Data: "failing1/failing_test.go:15: undefined: x"},
{Type: "output", Data: "# package/name/failing2 [package/name/failing2.test]"},
{Type: "output", Data: "failing2/another_failing_test.go:20: undefined: y"},
{Type: "output", Data: "# package/name/setupfailing1 [package/name/setupfailing1.test]"},
{Type: "output", Data: "setupfailing1/failing_test.go:4: cannot find package \"other/package\" in any of:"},
{Type: "output", Data: "\t/path/vendor (vendor tree)"},
{Type: "output", Data: "\t/path/go/root (from $GOROOT)"},
{Type: "output", Data: "\t/path/go/path (from $GOPATH)"},
{Type: "run_test", Name: "TestA"},
{Type: "end_test", Name: "TestA", Result: "PASS", Duration: 100 * time.Millisecond},
{Type: "status", Result: "PASS"},
{Type: "summary", Result: "ok", Name: "package/name/passing1", Duration: 100 * time.Millisecond},
{Type: "run_test", Name: "TestB"},
{Type: "end_test", Name: "TestB", Result: "PASS", Duration: 100 * time.Millisecond},
{Type: "status", Result: "PASS"},
{Type: "summary", Result: "ok", Name: "package/name/passing2", Duration: 100 * time.Millisecond},
{Type: "summary", Result: "FAIL", Name: "package/name/failing1", Data: "[build failed]"},
{Type: "summary", Result: "FAIL", Name: "package/name/failing2", Data: "[build failed]"},
{Type: "summary", Result: "FAIL", Name: "package/name/setupfailing1", Data: "[setup failed]"},
}},
{"32-failed-summary", []gtr.Event{}},
{"130-bench-mb", []gtr.Event{}},
{"131-whitespace",