diff options
author | Burak Emir <emir@epfl.ch> | 2006-09-03 21:27:08 +0000 |
---|---|---|
committer | Burak Emir <emir@epfl.ch> | 2006-09-03 21:27:08 +0000 |
commit | f81fd55cf6e27290a2ab6f03f98f07aceacd2ba6 (patch) | |
tree | f85425677a69f83f123eda2791cee3761c781d33 /test | |
parent | 9ea0d2b4bcc7a5550a94c522402adb90ab3f0e18 (diff) | |
download | scala-f81fd55cf6e27290a2ab6f03f98f07aceacd2ba6.tar.gz scala-f81fd55cf6e27290a2ab6f03f98f07aceacd2ba6.tar.bz2 scala-f81fd55cf6e27290a2ab6f03f98f07aceacd2ba6.zip |
added group and changed metadata
Diffstat (limited to 'test')
-rw-r--r-- | test/files/jvm/xml01.check | 3 | ||||
-rw-r--r-- | test/files/jvm/xml01.scala | 9 | ||||
-rw-r--r-- | test/files/jvm/xmlstuff.scala | 11 |
3 files changed, 19 insertions, 4 deletions
diff --git a/test/files/jvm/xml01.check b/test/files/jvm/xml01.check index b535e2c511..5e9ee2aed0 100644 --- a/test/files/jvm/xml01.check +++ b/test/files/jvm/xml01.check @@ -19,6 +19,9 @@ passed ok passed ok <book><author>Peter Buneman</author><author>Dan Suciu</author><title>Data on ze web</title></book> passed ok +-- group nodes +<f><a></a><b></b><c></c></f> +<a></a><f><a></a><b></b><c></c></f><a></a><b></b><c></c> attribute value normalization passed ok passed ok diff --git a/test/files/jvm/xml01.scala b/test/files/jvm/xml01.scala index 8eccdcbae9..3ba0bbd193 100644 --- a/test/files/jvm/xml01.scala +++ b/test/files/jvm/xml01.scala @@ -180,6 +180,15 @@ object Test { ) ); + // test group node + Console println "-- group nodes" + val zx1: Node = Group { <a/><b/><c/> } + val zy1 = <f>{zx1}</f> + Console println zy1.toString() + + val zx2: Node = Group { List(<a/>,zy1,zx1) } + Console println zx2.toString() + // test unicode escapes backslash u Console println ("attribute value normalization"); diff --git a/test/files/jvm/xmlstuff.scala b/test/files/jvm/xmlstuff.scala index 0d1aad5fac..7c66068b5a 100644 --- a/test/files/jvm/xmlstuff.scala +++ b/test/files/jvm/xmlstuff.scala @@ -61,13 +61,16 @@ passed ok </foo>; val pelems_1 = for( val x <- p \ "bar"; val y <- p \ "baz" ) yield { - Text(x.attribute("value").toString() + y.attribute("bazValue").toString()+ "!") + Text(x.attributes("value").toString() + y.attributes("bazValue").toString()+ "!") }; val pelems_2 = new NodeSeq { val theSeq = List(Text("38!"),Text("58!")) }; assertSameElements(pelems_1, pelems_2); - assertSameElements( - p \\ "@value", new NodeSeq { val theSeq = List(Text("3"), Text("5")) } - ); + + assertEquals(p \\ "@bazValue", Text("8")) + // the following won't work anymore because of group nodes + //assertSameElements( + // p \\ "@value", new NodeSeq { val theSeq = List(Text("3"), Text("5")) } + //); /* // more test cases !!! |