Skip to content

Commit

Permalink
Merge pull request #2 from yerden/fix-lineno
Browse files Browse the repository at this point in the history
internal: fix lineNo handling
  • Loading branch information
akutz authored Dec 19, 2024
2 parents 63110e1 + d7e4f31 commit 7d37df9
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 7d37df9

Please sign in to comment.