From 82dcd5276ed622b546f3c42b86e043b7cff87f65 Mon Sep 17 00:00:00 2001 From: Pam Selle Date: Tue, 18 Jun 2019 16:43:28 -0400 Subject: [PATCH] Normalize in the fmt -check test --- command/fmt_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/command/fmt_test.go b/command/fmt_test.go index 1828c7f62..f35737953 100644 --- a/command/fmt_test.go +++ b/command/fmt_test.go @@ -245,6 +245,10 @@ func TestFmt_check(t *testing.T) { t.Fatalf("wrong exit code. expected 3") } + // Given that we give relative paths back to the user, normalize this temp + // dir so that we're comparing against a relative-ized (normalized) path + tempDir = c.normalizePath(tempDir) + if actual := ui.OutputWriter.String(); !strings.Contains(actual, tempDir) { t.Fatalf("expected:\n%s\n\nto include: %q", actual, tempDir) }