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) }