summaryrefslogtreecommitdiff
path: root/test/files/run/bug2354.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-01-15 02:12:10 +0000
committerPaul Phillips <paulp@improving.org>2010-01-15 02:12:10 +0000
commit2d324f4506191ba9059e14fa7482c2276b5f255a (patch)
treede9b4d00d4864eaaffdd033d36edf420ba83f619 /test/files/run/bug2354.scala
parentdf4d259938d2a522ba0726e86ded78d2a09982ce (diff)
downloadscala-2d324f4506191ba9059e14fa7482c2276b5f255a.tar.gz
scala-2d324f4506191ba9059e14fa7482c2276b5f255a.tar.bz2
scala-2d324f4506191ba9059e14fa7482c2276b5f255a.zip
Fix and test for #2354. Review by community.
Diffstat (limited to 'test/files/run/bug2354.scala')
-rw-r--r--test/files/run/bug2354.scala17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/files/run/bug2354.scala b/test/files/run/bug2354.scala
new file mode 100644
index 0000000000..f46db13a95
--- /dev/null
+++ b/test/files/run/bug2354.scala
@@ -0,0 +1,17 @@
+import scala.xml.parsing._
+import scala.io.Source
+
+object Test
+{
+ val xml_good = "<title><![CDATA[Hello [tag]]]></title>"
+ val xml_bad = "<title><![CDATA[Hello [tag] ]]></title>"
+
+ val parser1 = ConstructingParser.fromSource(Source.fromString(xml_good),false)
+ val parser2 = ConstructingParser.fromSource(Source.fromString(xml_bad),false)
+
+ def main(args: Array[String]): Unit = {
+ parser1.document
+ parser2.document
+ }
+}
+