File tree 1 file changed +5
-2
lines changed
compiler/test/dotty/tools/dotc/repl
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ package repl
4
4
5
5
import core .Contexts .Context
6
6
import collection .mutable
7
- import java .io .StringWriter
7
+ import java .io .{ StringWriter , PrintStream }
8
8
9
9
/** A subclass of REPL used for testing.
10
10
* It takes a transcript of a REPL session in `script`. The transcript
@@ -56,8 +56,11 @@ class TestREPL(script: String) extends REPL {
56
56
val printed = out.toString
57
57
val transcript = printed.drop(printed.indexOf(config.prompt))
58
58
if (transcript.toString.lines.toList != script.lines.toList) {
59
- println(" input differs from transcript:" )
59
+ println(" input differs from transcript (copy is repl.transcript) :" )
60
60
println(transcript)
61
+ val s = new PrintStream (" repl.transcript" )
62
+ s.print(transcript)
63
+ s.close()
61
64
assert(false )
62
65
}
63
66
}
You can’t perform that action at this time.
0 commit comments