Skip to content

Commit 60a55d7

Browse files
Fix the testrunner.ErrUnexpectedOutput.Error() method
1 parent 861dbf7 commit 60a55d7

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

test-runner/errors.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ type ErrUnexpectedOutput struct {
3030
// Error ...
3131
func (err ErrUnexpectedOutput) Error() string {
3232
return fmt.Sprintf(
33-
"unexpected output: expected - %q, actual - %q",
33+
"unexpected output (input - %q): expected - %q, actual - %q",
34+
err.Input,
3435
err.ExpectedOutput,
3536
err.ActualOutput,
3637
)

test-runner/errors_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func TestErrUnexpectedOutput_Error(test *testing.T) {
2222
ActualOutput: "actual output",
2323
}
2424

25-
const wantedErrMessage = "unexpected output: " +
25+
const wantedErrMessage = `unexpected output (input - "input"): ` +
2626
`expected - "expected output", actual - "actual output"`
2727
assert.EqualError(test, err, wantedErrMessage)
2828
}

0 commit comments

Comments
 (0)