mirror of
https://github.com/jstemmer/go-junit-report.git
synced 2025-07-06 22:12:51 -05:00
parser/gotest: Fix indent detection of test output
This commit is contained in:
@ -128,10 +128,9 @@ func (p *parser) coverage(percent string) {
|
||||
}
|
||||
|
||||
func (p *parser) output(line string) {
|
||||
// TODO: Count indentations, however don't assume every tab is an indentation
|
||||
var indent int
|
||||
for indent = 0; strings.HasPrefix(line, "\t"); indent++ {
|
||||
line = line[1:]
|
||||
for indent = 0; strings.HasPrefix(line, " "); indent++ {
|
||||
line = line[4:]
|
||||
}
|
||||
p.add(Event{
|
||||
Type: "output",
|
||||
|
Reference in New Issue
Block a user