From 18e71cb8364453e9d6d34aa6b8a667bf12a82461 Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Mon, 27 Jan 2025 21:32:11 +0100 Subject: [PATCH] acc: Print full paths in case of issues --- acceptance/acceptance_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/acceptance/acceptance_test.go b/acceptance/acceptance_test.go index 1c4e7cafc4..125f8ba445 100644 --- a/acceptance/acceptance_test.go +++ b/acceptance/acceptance_test.go @@ -262,7 +262,7 @@ func doComparison(t *testing.T, repls testdiff.ReplacementsContext, dirRef, dirN bufRef, okRef := tryReading(t, pathRef) bufNew, okNew := tryReading(t, pathNew) if !okRef && !okNew { - t.Errorf("Both files are missing or have errors: %s, %s", pathRef, pathNew) + t.Errorf("Both files are missing or have errors: %s\npathNew: %s\npathRef: %s", relPath, pathRef, pathNew) return } @@ -275,7 +275,7 @@ func doComparison(t *testing.T, repls testdiff.ReplacementsContext, dirRef, dirN // The test did not produce an expected output file. if okRef && !okNew { - t.Errorf("Missing output file: %s", relPath) + t.Errorf("Missing output file: %s\npathNew: %s\npathRef: %s", relPath, pathNew, pathRef) testdiff.AssertEqualTexts(t, pathRef, pathNew, valueRef, valueNew) if testdiff.OverwriteMode { t.Logf("Removing output file: %s", relPath) @@ -286,7 +286,7 @@ func doComparison(t *testing.T, repls testdiff.ReplacementsContext, dirRef, dirN // The test produced an unexpected output file. if !okRef && okNew { - t.Errorf("Unexpected output file: %s", relPath) + t.Errorf("Unexpected output file: %s\npathNew: %s\npathRef: %s", relPath, pathNew, pathRef) testdiff.AssertEqualTexts(t, pathRef, pathNew, valueRef, valueNew) if testdiff.OverwriteMode { t.Logf("Writing output file: %s", relPath)