From 499e1d7ddc53fd8b1732e78fd74878e1d138a791 Mon Sep 17 00:00:00 2001 From: Anthony Fok Date: Sun, 2 Jan 2022 19:22:18 -0700 Subject: [PATCH] Fix reversed Got/Expected in expectFileContent in docs_test.go --- docs_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs_test.go b/docs_test.go index 5308f372f7..adccbbb9ad 100644 --- a/docs_test.go +++ b/docs_test.go @@ -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) {