Skip to content

Commit e44f5a0

Browse files
committed
assert/tests: improve failure reporting in Test{No,}{File,Dir}Exists
Improve error reporting in getTempSymlinkPath by displaying the file paths.
1 parent 8498244 commit e44f5a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

assert/assertions_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2626,7 +2626,7 @@ func getTempSymlinkPath(t *testing.T, file string) string {
26262626
tempDir := t.TempDir()
26272627
link := filepath.Join(tempDir, file+"_symlink")
26282628
if err := os.Symlink(file, link); err != nil {
2629-
t.Fatal("could not create temp symlink, err:", err)
2629+
t.Fatalf("could not create temp symlink %q pointing to %q: %v", link, file, err)
26302630
}
26312631
return link
26322632
}

0 commit comments

Comments
 (0)