aboutsummaryrefslogtreecommitdiff
path: root/compiler/test/dotty/tools/dotc/repl
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2017-02-08 18:34:16 +1100
committerMartin Odersky <odersky@gmail.com>2017-04-04 13:29:38 +0200
commitdb387a292eebdd834729323bdf6f182cbd137b2e (patch)
treead46967d0de7ccc0657bf541a64a941a7271eb95 /compiler/test/dotty/tools/dotc/repl
parentb4ece2a235cc335d3afc58112652f6c98b25435f (diff)
downloaddotty-db387a292eebdd834729323bdf6f182cbd137b2e.tar.gz
dotty-db387a292eebdd834729323bdf6f182cbd137b2e.tar.bz2
dotty-db387a292eebdd834729323bdf6f182cbd137b2e.zip
Improvement to REPL test
In case of difference, dump transcript to file for easier comparisons.
Diffstat (limited to 'compiler/test/dotty/tools/dotc/repl')
-rw-r--r--compiler/test/dotty/tools/dotc/repl/TestREPL.scala5
1 files changed, 4 insertions, 1 deletions
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)
}
}