We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 19aa1bd commit 34976e7Copy full SHA for 34976e7
test/test/TestREPL.scala
@@ -5,6 +5,14 @@ import dotty.tools.dotc.core.Contexts.Context
5
import collection.mutable
6
import java.io.StringWriter
7
8
+/** A subclass of REPL used for testing.
9
+ * It takes a transcript of a REPL session in `script`. The transcript
10
+ * starts with the first input prompt `scala> ` and ends with `scala> :quit` and a newline.
11
+ * Invoking `process()` on the `TestREPL` runs all input lines and
12
+ * collects then interleaved with REPL output in a string writer `out`.
13
+ * Invoking `check()` checks that the collected output matches the original
14
+ * `script`.
15
+ */
16
class TestREPL(script: String) extends REPL {
17
18
private val out = new StringWriter()
0 commit comments