Add go 1.7 compatibility

* Subtests and nested subtests have spaces at the beginning of their
PASS statements. This has been added to the regexp.
This commit is contained in:
Patrick O'brien
2016-08-16 17:07:54 +10:00
committed by Aiden Scandella
parent 833f8ea2b9
commit 24d394d799
4 changed files with 133 additions and 1 deletions

View File

@ -355,6 +355,92 @@ var testCases = []TestCase{
},
},
},
{
name: "12-go_1_7.txt",
reportName: "12-report.xml",
report: &parser.Report{
Packages: []parser.Package{
{
Name: "package/name",
Time: 50,
Tests: []*parser.Test{
{
Name: "TestOne",
Time: 10,
Result: parser.PASS,
Output: []string{},
},
{
Name: "TestOne/Child",
Time: 20,
Result: parser.PASS,
Output: []string{},
},
{
Name: "TestOne/Child#01",
Time: 30,
Result: parser.PASS,
Output: []string{},
},
{
Name: "TestOne/Child=02",
Time: 40,
Result: parser.PASS,
Output: []string{},
},
{
Name: "TestTwo",
Time: 10,
Result: parser.PASS,
Output: []string{},
},
{
Name: "TestTwo/Child",
Time: 20,
Result: parser.PASS,
Output: []string{},
},
{
Name: "TestTwo/Child#01",
Time: 30,
Result: parser.PASS,
Output: []string{},
},
{
Name: "TestTwo/Child=02",
Time: 40,
Result: parser.PASS,
Output: []string{},
},
{
Name: "TestThree",
Time: 10,
Result: parser.PASS,
Output: []string{},
},
{
Name: "TestThree/a#1",
Time: 20,
Result: parser.PASS,
Output: []string{},
},
{
Name: "TestThree/a#1/b#1",
Time: 30,
Result: parser.PASS,
Output: []string{},
},
{
Name: "TestThree/a#1/b#1/c#1",
Time: 40,
Result: parser.PASS,
Output: []string{},
},
},
},
},
},
},
}
func TestParser(t *testing.T) {