Skip to content

Commit db387a2

Browse files
committed
Improvement to REPL test
In case of difference, dump transcript to file for easier comparisons.
1 parent b4ece2a commit db387a2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

compiler/test/dotty/tools/dotc/repl/TestREPL.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,11 @@ class TestREPL(script: String) extends REPL {
5858
val printed = out.toString
5959
val transcript = printed.drop(printed.indexOf(config.prompt))
6060
if (transcript.toString.lines.toList != script.lines.toList) {
61-
println("input differs from transcript:")
61+
println("input differs from transcript (copy is repl.transcript):")
6262
println(transcript)
63+
val s = new PrintStream("repl.transcript")
64+
s.print(transcript)
65+
s.close()
6366
assert(false)
6467
}
6568
}

0 commit comments

Comments
 (0)