Skip to content

Commit 8b2d1dd

Browse files
authored
Show git diff command on checkfile failure (#19308)
2 parents 3e2a9a5 + b5479c5 commit 8b2d1dd

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

compiler/test/dotty/tools/vulpix/FileDiff.scala

+5-2
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@ import java.nio.charset.StandardCharsets
1212

1313

1414
object FileDiff {
15+
def diffCommand(expectFile: String, actualFile: String): String =
16+
s"git diff --no-index -- $expectFile $actualFile"
17+
1518
def diffMessage(expectFile: String, actualFile: String): String =
1619
s"""Test output dumped in: $actualFile
17-
| See diff of the checkfile (`brew install icdiff` for colored diff)
18-
| > diff $expectFile $actualFile
20+
| See diff of the checkfile (`--color=always` for colored diff)
21+
| > ${FileDiff.diffCommand(expectFile, actualFile)}
1922
| Replace checkfile with current output
2023
| > mv $actualFile $expectFile
2124
""".stripMargin

0 commit comments

Comments
 (0)