mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-29 12:44:22 +01:00
getting some tests working
This commit is contained in:
1 parent
da1210db38
commit
c9bc6b4608
5 files changed
+126
-76
No files matched your search
@@ -49,7 +49,7 @@ func TestGetLocation(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
loc := getLocation(test.linePairs, test.start, test.end)
|
||||
loc := location(Fragment{newlineIndices: test.linePairs}, []int{test.start, test.end})
|
||||
if loc != test.wantLocation {
|
||||
t.Errorf("\nstartLine %d\nstartColumn: %d\nendLine: %d\nendColumn: %d\nstartLineIndex: %d\nendlineIndex %d",
|
||||
loc.startLine, loc.startColumn, loc.endLine, loc.endColumn, loc.startLineIndex, loc.endLineIndex)
|
||||
|
||||
Reference in new issue
Block a user