diff options
author | buraq <buraq@epfl.ch> | 2004-06-29 14:43:11 +0000 |
---|---|---|
committer | buraq <buraq@epfl.ch> | 2004-06-29 14:43:11 +0000 |
commit | b47b66ba0cfa703c21f4d14db3dce6a0dddc4aa0 (patch) | |
tree | 8240aac8317583d63b5c6fa23acd03312ec4c6c1 | |
parent | d2db0dc89df674a898c0eb0aee69bc326e74dfd6 (diff) | |
download | scala-b47b66ba0cfa703c21f4d14db3dce6a0dddc4aa0.tar.gz scala-b47b66ba0cfa703c21f4d14db3dce6a0dddc4aa0.tar.bz2 scala-b47b66ba0cfa703c21f4d14db3dce6a0dddc4aa0.zip |
added testcase for namespaces
-rw-r--r-- | test/files/jvm/xmlLiterals.check | 3 | ||||
-rw-r--r-- | test/files/jvm/xmlLiterals.scala | 20 |
2 files changed, 22 insertions, 1 deletions
diff --git a/test/files/jvm/xmlLiterals.check b/test/files/jvm/xmlLiterals.check index d18fa8fed5..d167d4ce5c 100644 --- a/test/files/jvm/xmlLiterals.check +++ b/test/files/jvm/xmlLiterals.check @@ -49,3 +49,6 @@ passed ok Test05Ref <foo>{</foo> <foo> {<bar><baz></baz></bar><bar></bar></foo> +namespace +<foo xmlns="www.bar.com" xmlns:ns0="www.baz.com"><ns0:baz></ns0:baz></foo> +<bar:foo xmlns:bar="www.bar.com" xmlns="www.baz.com"><baz></baz></bar:foo> diff --git a/test/files/jvm/xmlLiterals.scala b/test/files/jvm/xmlLiterals.scala index 65abd50094..d68a61ab62 100644 --- a/test/files/jvm/xmlLiterals.scala +++ b/test/files/jvm/xmlLiterals.scala @@ -266,6 +266,22 @@ object Test03Servlet { Console.println( x2 ); } + def test06 = { + + val foo = + <bar:foo xmlns:bar="www.bar.com" xmlns="www.baz.com"> + <baz/> + </bar:foo>; + + Console.println( foo ); + val h = new scala.collection.mutable.HashMap[String,String](); + h("www.bar.com") = "bar"; + h("www.baz.com") = ""; + Console.println( Utility.toXML(foo, h) ); + + } + + def main( args:Array[String] ):Unit = { Console.println("Test01Literals"); Test01Literals; @@ -276,7 +292,9 @@ object Test03Servlet { Console.println("Test04"); Test04; Console.println("Test05Ref"); - test05main;{ + test05main; + Console.println("namespace"); + test06;{ } } |