Skip to content

Commit

Permalink
acc: Print full paths in case of issues
Browse files Browse the repository at this point in the history
  • Loading branch information
denik committed Jan 28, 2025
1 parent d22d42a commit d4003d7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions acceptance/acceptance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand All @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit d4003d7

Please sign in to comment.