From db387a292eebdd834729323bdf6f182cbd137b2e Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Wed, 8 Feb 2017 18:34:16 +1100 Subject: Improvement to REPL test In case of difference, dump transcript to file for easier comparisons. --- compiler/test/dotty/tools/dotc/repl/TestREPL.scala | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'compiler/test/dotty/tools') diff --git a/compiler/test/dotty/tools/dotc/repl/TestREPL.scala b/compiler/test/dotty/tools/dotc/repl/TestREPL.scala index 131a88ab1..44523aae9 100644 --- a/compiler/test/dotty/tools/dotc/repl/TestREPL.scala +++ b/compiler/test/dotty/tools/dotc/repl/TestREPL.scala @@ -58,8 +58,11 @@ class TestREPL(script: String) extends REPL { val printed = out.toString val transcript = printed.drop(printed.indexOf(config.prompt)) if (transcript.toString.lines.toList != script.lines.toList) { - println("input differs from transcript:") + println("input differs from transcript (copy is repl.transcript):") println(transcript) + val s = new PrintStream("repl.transcript") + s.print(transcript) + s.close() assert(false) } } -- cgit v1.2.3