Skip to content

Commit bec4e88

Browse files
committed
Fix validator test
1 parent e1c7088 commit bec4e88

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

pkg/runtime/validator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ func validateExpectedLines(got string, expected ExpectedOut) matcher.MatcherResu
149149
Success: false,
150150
Diff: fmt.Sprintf(
151151
"Line number %d does not exists in result: \n\n%s",
152-
key-1,
152+
key,
153153
strings.Join(actualLines, "\n"),
154154
),
155155
}

pkg/runtime/validator_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ func Test_ValidateExpectedOut_MatchLines_ExpectedLineDoesNotExists(t *testing.T)
100100
got := validateExpectedOut(value, ExpectedOut{Lines: map[int]string{2: "my", 3: "line"}})
101101

102102
assert.False(t, got.Success)
103-
diff := `Line number 1 does not exists in result:
103+
diff := `Line number 2 does not exists in result:
104104
105105
test`
106106
assert.Equal(t, diff, got.Diff)

0 commit comments

Comments
 (0)