summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
authorburaq <buraq@epfl.ch>2004-02-09 18:07:31 +0000
committerburaq <buraq@epfl.ch>2004-02-09 18:07:31 +0000
commitd6963262b4a68577925b1281d246e30e3265e97a (patch)
tree0fcb32ebacb99c37142b7911c9b1742245483002 /test/files
parent6157d537870e859fc2833eb53d62a5f0b0884b87 (diff)
downloadscala-d6963262b4a68577925b1281d246e30e3265e97a.tar.gz
scala-d6963262b4a68577925b1281d246e30e3265e97a.tar.bz2
scala-d6963262b4a68577925b1281d246e30e3265e97a.zip
projections on XML ! preserving document order !
Diffstat (limited to 'test/files')
-rw-r--r--test/files/run/xmlstuff.check8
-rw-r--r--test/files/run/xmlstuff.scala8
2 files changed, 15 insertions, 1 deletions
diff --git a/test/files/run/xmlstuff.check b/test/files/run/xmlstuff.check
index af85d96257..4636a6f8b4 100644
--- a/test/files/run/xmlstuff.check
+++ b/test/files/run/xmlstuff.check
@@ -20,4 +20,10 @@ parsedxml2/'_/'_/'author
NodeList()
parsedxml2/#'author
-NodeList('author(Text(Dan Suciu)),'author(Text(Peter Buneman)),'author(Text(John Mitchell)))
+NodeList('author(Text(Peter Buneman)),'author(Text(Dan Suciu)),'author(Text(John Mitchell)))
+
+new NodeList(List(parsedxml2))/#'_
+NodeList('book('author(Text(Peter Buneman)),'author(Text(Dan Suciu)),'title(Text(Data on ze web))),'author(Text(Peter Buneman)),Text(Peter Buneman),'author(Text(Dan Suciu)),Text(Dan Suciu),'title(Text(Data on ze web)),Text(Data on ze web),'book('author(Text(John Mitchell)),'title(Text(Foundations of Programming Languages))),'author(Text(John Mitchell)),Text(John Mitchell),'title(Text(Foundations of Programming Languages)),Text(Foundations of Programming Languages))
+
+new NodeList(List(parsedxml2))/#'title
+NodeList('title(Text(Data on ze web)),'title(Text(Foundations of Programming Languages)))
diff --git a/test/files/run/xmlstuff.scala b/test/files/run/xmlstuff.scala
index 916798e112..28f753ce90 100644
--- a/test/files/run/xmlstuff.scala
+++ b/test/files/run/xmlstuff.scala
@@ -2,6 +2,7 @@ import java.io.StringReader;
import org.xml.sax.InputSource;
import scala.xml.nobinding.XML;
import scala.testing.UnitTest.assertEquals ;
+import scala.xml.NodeList;
object Test with Application {
val xmlFile1 = "<hello><world/></hello>";
@@ -39,4 +40,11 @@ object Test with Application {
Console.println( "\nparsedxml2/#'author");
Console.println( parsedxml2/#'author );
+ Console.println( "\nnew NodeList(List(parsedxml2))/#'_");
+ Console.println( new NodeList( List( parsedxml2 ))/#'_ );
+
+ Console.println( "\nnew NodeList(List(parsedxml2))/#'title");
+ Console.println( new NodeList( List( parsedxml2 ))/#'title );
+
+
}