Add support for -coverpkg output

Fixes #59
This commit is contained in:
Joël Stemmer
2017-07-24 21:44:35 +01:00
parent cce73b4996
commit 15422cf504
4 changed files with 72 additions and 2 deletions

View File

@ -642,6 +642,46 @@ var testCases = []TestCase{
},
},
},
{
name: "18-coverpkg.txt",
reportName: "18-report.xml",
report: &parser.Report{
Packages: []parser.Package{
{
Name: "package1/foo",
Time: 400,
Tests: []*parser.Test{
{
Name: "TestA",
Time: 100,
Result: parser.PASS,
Output: []string{},
},
{
Name: "TestB",
Time: 300,
Result: parser.PASS,
Output: []string{},
},
},
CoveragePct: "10.0",
},
{
Name: "package2/bar",
Time: 4200,
Tests: []*parser.Test{
{
Name: "TestC",
Time: 4200,
Result: parser.PASS,
Output: []string{},
},
},
CoveragePct: "99.8",
},
},
},
},
}
func TestParser(t *testing.T) {