summaryrefslogtreecommitdiff
path: root/test/files/jvm
diff options
context:
space:
mode:
authorBurak Emir <emir@epfl.ch>2007-11-25 20:43:41 +0000
committerBurak Emir <emir@epfl.ch>2007-11-25 20:43:41 +0000
commit2ee9e59b353536a601cdf71ea14223ee3fff471b (patch)
tree0bb35a167c2a2f57805f393ab4ad90d410c96098 /test/files/jvm
parent79842acc1a93bbdc023b046401ef3786b39ef817 (diff)
downloadscala-2ee9e59b353536a601cdf71ea14223ee3fff471b.tar.gz
scala-2ee9e59b353536a601cdf71ea14223ee3fff471b.tar.bz2
scala-2ee9e59b353536a601cdf71ea14223ee3fff471b.zip
fixed namespace printing bug - props to DPP who...
fixed namespace printing bug - props to DPP who found and reported it.
Diffstat (limited to 'test/files/jvm')
-rw-r--r--test/files/jvm/xml02.scala15
1 files changed, 11 insertions, 4 deletions
diff --git a/test/files/jvm/xml02.scala b/test/files/jvm/xml02.scala
index 143d125a7f..2eabaf1fbc 100644
--- a/test/files/jvm/xml02.scala
+++ b/test/files/jvm/xml02.scala
@@ -15,7 +15,7 @@ object Test extends TestConsoleMain {
val bx = <hello foo="bar&amp;x"></hello>
- class XmlEx extends TestCase("attributes") with Assert {
+ object XmlEx extends TestCase("attributes") with Assert {
override def runTest = {
assertTrue("@one", ax \ "@foo" == "bar") // uses NodeSeq.view!
@@ -27,7 +27,7 @@ object Test extends TestConsoleMain {
}
}
- class XmlPat extends TestCase("patterns") with Assert {
+ object XmlPat extends TestCase("patterns") with Assert {
override def runTest = {
assertTrue(<hello/> match { case <hello/> => true; case _ => false; })
assertTrue(<x:ga xmlns:x="z"/> match { case <x:ga/> => true; case _ => false; });
@@ -36,8 +36,15 @@ object Test extends TestConsoleMain {
}
}
+ object DodgyNamespace extends TestCase("DodgyNamespace") with Assert {
+ override def runTest = {
+ val x = <flog xmlns:ee="http://ee.com"><foo xmlns:dog="http://dog.com"><dog:cat/></foo></flog>
+ assertTrue(x.toString.contains("xmlns:dog=\"http://dog.com\""));
+ }
+ }
def suite = new TestSuite(
- new XmlEx,
- new XmlPat
+ XmlEx,
+ XmlPat,
+ DodgyNamespace
)
}