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

@ -40,7 +40,7 @@ type Test struct {
}
var (
regexStatus = regexp.MustCompile(`^--- (PASS|FAIL|SKIP): (.+) \((\d+\.\d+)(?: seconds|s)\)$`)
regexStatus = regexp.MustCompile(`^\s*--- (PASS|FAIL|SKIP): (.+) \((\d+\.\d+)(?: seconds|s)\)$`)
regexCoverage = regexp.MustCompile(`^coverage:\s+(\d+\.\d+)%\s+of\s+statements$`)
regexResult = regexp.MustCompile(`^(ok|FAIL)\s+(.+)\s(\d+\.\d+)s(?:\s+coverage:\s+(\d+\.\d+)%\s+of\s+statements)?$`)
)