Skip to content

Commit

Permalink
internal: fix lineNo handling
Browse files Browse the repository at this point in the history
Signed-off-by: Yerden Zhumabekov <[email protected]>
  • Loading branch information
yerden committed Jul 18, 2022
1 parent 63110e1 commit d7e4f31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/testcase.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ func getTestCasesInFile(
}
tc.Matches = append(tc.Matches, LineMatcher{
Regexp: r,
Source: lines[lineNo],
Source: lines[lineNo-1],
})
} else if m := natchRx.FindStringSubmatch(l); m != nil {
if tc, _ = lookupTbl.Get(m[1]); tc == nil {
Expand All @@ -306,7 +306,7 @@ func getTestCasesInFile(
}
tc.Natches = append(tc.Natches, LineMatcher{
Regexp: r,
Source: lines[lineNo],
Source: lines[lineNo-1],
})
}
}
Expand Down

0 comments on commit d7e4f31

Please sign in to comment.