Skip to content

Commit

Permalink
Fix reversed Got/Expected in expectFileContent in docs_test.go
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyfok committed Jan 3, 2022
1 parent 9afa074 commit 217b8f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs_test.go
Expand Up @@ -119,13 +119,13 @@ Should be a part of the same code block
return app
}

func expectFileContent(t *testing.T, file, expected string) {
func expectFileContent(t *testing.T, file, got string) {
data, err := ioutil.ReadFile(file)
// Ignore windows line endings
// TODO: Replace with bytes.ReplaceAll when support for Go 1.11 is dropped
data = bytes.Replace(data, []byte("\r\n"), []byte("\n"), -1)
expect(t, err, nil)
expect(t, string(data), expected)
expect(t, got, string(data))
}

func TestToMarkdownFull(t *testing.T) {
Expand Down

0 comments on commit 217b8f3

Please sign in to comment.