summaryrefslogtreecommitdiff
path: root/test/files/run/xml-loop-bug.scala
blob: dc155dbb02698bd7902f4e8569bf5f1702e2d856 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import java.io.{ Console => _, _ }
import scala.io._
import scala.xml.parsing._
object Test {
  def main(args: Array[String]): Unit = {
    val xml = "<!DOCTYPE xmeml SYSTEM> <xmeml> <sequence> </sequence> </xmeml> "
    val sink = new PrintStream(new ByteArrayOutputStream())
    (Console withOut sink) {
      (Console withErr sink) {
        ConstructingParser.fromSource((Source fromString xml), true).document.docElem 
      }
    }
  }
}