From f81fd55cf6e27290a2ab6f03f98f07aceacd2ba6 Mon Sep 17 00:00:00 2001 From: Burak Emir Date: Sun, 3 Sep 2006 21:27:08 +0000 Subject: added group and changed metadata --- test/files/jvm/xml01.check | 3 +++ test/files/jvm/xml01.scala | 9 +++++++++ test/files/jvm/xmlstuff.scala | 11 +++++++---- 3 files changed, 19 insertions(+), 4 deletions(-) (limited to 'test') 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 Peter BunemanDan SuciuData on ze web passed ok +-- group nodes + + 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 { } + val zy1 = {zx1} + Console println zy1.toString() + + val zx2: Node = Group { List(,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 ; 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 !!! -- cgit v1.2.3