Permalink
Browse files

Test adjustments.

  • Loading branch information...
paulp committed May 15, 2012
1 parent 317a105 commit f865e3b9a0f053c09669ca70c77d88456ed2b8ba
Showing with 4 additions and 1 deletion.
  1. +1 −0 src/compiler/scala/tools/nsc/interpreter/IMain.scala
  2. +3 −1 test/files/run/xml-loop-bug.scala
@@ -583,6 +583,7 @@ class IMain(initialSettings: Settings, protected val out: JPrintWriter) extends
def interpretSynthetic(line: String): IR.Result = interpret(line, true)
def interpret(line: String, synthetic: Boolean): IR.Result = {
def loadAndRunReq(req: Request) = {
+ classLoader.setAsContext()
val (result, succeeded) = req.loadAndRun
/** To our displeasure, ConsoleReporter offers only printMessage,
@@ -1,6 +1,8 @@
object Test {
def main(args: Array[String]): Unit = {
- scala.tools.nsc.io.NullPrintStream.setOutAndErr()
+ val sink = new java.io.PrintStream(new java.io.ByteArrayOutputStream())
+ Console setOut sink
+ Console setErr sink
scala.xml.parsing.ConstructingParser.fromSource(scala.io.Source.fromString("<!DOCTYPE xmeml SYSTEM> <xmeml> <sequence> </sequence> </xmeml> "), true).document.docElem
}
}

0 comments on commit f865e3b

Please sign in to comment.