Fix reversed Got/Expected in expectFileContent in docs_test.go (#1320)

main
Anthony Fok 2 years ago committed by GitHub
parent 9afa0745ed
commit a7d59840f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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) {

Loading…
Cancel
Save