diff options
author | buraq <buraq@epfl.ch> | 2004-02-11 11:49:34 +0000 |
---|---|---|
committer | buraq <buraq@epfl.ch> | 2004-02-11 11:49:34 +0000 |
commit | d266b00a2d453a05a1192d6843c74ac7c052b3ef (patch) | |
tree | cd33fd18e268abf7ad5518f478beca799e400193 /test | |
parent | da6966888b1703c69dfe17f7f471565edc46e5a2 (diff) | |
download | scala-d266b00a2d453a05a1192d6843c74ac7c052b3ef.tar.gz scala-d266b00a2d453a05a1192d6843c74ac7c052b3ef.tar.bz2 scala-d266b00a2d453a05a1192d6843c74ac7c052b3ef.zip |
these are jvm dependent -> ../jvm
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/xmlstuff.check | 29 | ||||
-rw-r--r-- | test/files/run/xmlstuff.scala | 50 |
2 files changed, 0 insertions, 79 deletions
diff --git a/test/files/run/xmlstuff.check b/test/files/run/xmlstuff.check deleted file mode 100644 index 4636a6f8b4..0000000000 --- a/test/files/run/xmlstuff.check +++ /dev/null @@ -1,29 +0,0 @@ -NodeList('world) -NodeList('world) - -parsedxml2/'_ -NodeList('book('author(Text(Peter Buneman)),'author(Text(Dan Suciu)),'title(Text(Data on ze web))),'book('author(Text(John Mitchell)),'title(Text(Foundations of Programming Languages)))) - -parsedxml2/'author -NodeList() - -parsedxml2/'book: -NodeList('book('author(Text(Peter Buneman)),'author(Text(Dan Suciu)),'title(Text(Data on ze web))),'book('author(Text(John Mitchell)),'title(Text(Foundations of Programming Languages)))) - -parsedxml2/'_/'_ -NodeList('author(Text(Peter Buneman)),'author(Text(Dan Suciu)),'title(Text(Data on ze web)),'author(Text(John Mitchell)),'title(Text(Foundations of Programming Languages))) - -parsedxml2/'_/'author -NodeList('author(Text(Peter Buneman)),'author(Text(Dan Suciu)),'author(Text(John Mitchell))) - -parsedxml2/'_/'_/'author -NodeList() - -parsedxml2/#'author -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 deleted file mode 100644 index 28f753ce90..0000000000 --- a/test/files/run/xmlstuff.scala +++ /dev/null @@ -1,50 +0,0 @@ -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>"; - val isrc1 = new InputSource( new StringReader( xmlFile1 ) ); - val parsedxml1 = XML.load( isrc1 ); - - val xmlFile2 = "<bib><book><author>Peter Buneman</author><author>Dan Suciu</author><title>Data on ze web</title></book><book><author>John Mitchell</author><title>Foundations of Programming Languages</title></book></bib>"; - val isrc2 = new InputSource( new StringReader( xmlFile2 ) ); - val parsedxml2 = XML.load( isrc2 ); - - // xmlFile2/book -> book,book - - Console.println( parsedxml1/'world ); /* List('world()) */ - Console.println( parsedxml1/'_ ); /* List('world()) */ - - Console.println( "\nparsedxml2/'_"); /* List(book,book) */ - Console.println( parsedxml2/'_); /* List(book,book) */ - - Console.println( "\nparsedxml2/'author"); /* List() */ - Console.println( parsedxml2/'author); /* List() */ - - Console.println( "\nparsedxml2/'book:"); - Console.println( parsedxml2/'book); /* List(book,book) */ - - Console.println( "\nparsedxml2/'_/'_"); - Console.println( parsedxml2/'_/'_ ); - Console.println( "\nparsedxml2/'_/'author"); - Console.println( parsedxml2/'_/'author ); - Console.println( "\nparsedxml2/'_/'_/'author"); - Console.println( parsedxml2/'_/'_/'author ); - /* List('author(Text("Peter Buneman")), - 'author(Text("Dan Suciu")), - 'author(Text("John Mitchell")))); */ - - 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 ); - - -} |