From: mkersten Date: Tue, 29 Jul 2003 11:00:21 +0000 (+0000) Subject: Added test case for bug#39959. X-Git-Tag: V1_1_1~182 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ee03a3e557204184380193807326d1131c1f2777;p=aspectj.git Added test case for bug#39959. Fails because classpath is incorrectly set to include aspectjtools.jar (by the harness). --- diff --git a/tests/bugs/bootstrapClasspath/UsesDOMParser.java b/tests/bugs/bootstrapClasspath/UsesDOMParser.java new file mode 100644 index 000000000..354b57b55 --- /dev/null +++ b/tests/bugs/bootstrapClasspath/UsesDOMParser.java @@ -0,0 +1,66 @@ +import org.xml.sax.SAXException; +import java.io.InputStream; +import java.io.IOException; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import org.xml.sax.InputSource; +import org.apache.xerces.parsers.DOMParser; +import java.io.PipedInputStream; +import java.io.PipedOutputStream; +import java.io.PrintWriter; +import org.w3c.dom.Document; + +//public class UsesDOMParser { +// +// public static void main(String[] args) throws Exception { +// PipedInputStream in = new PipedInputStream(); +// DOMParser parser = new DOMParser(); +// parser.parse(new InputSource(in)); +// System.out.println("All done!"); +// } +//} + +public class UsesDOMParser { + + public static void main(String[] args) throws Exception { + PipedInputStream in = new PipedInputStream(); + final PipedOutputStream out = new PipedOutputStream(in); + + Thread t = new Thread() { + public void run() { + try { + String str = + "\n" + + "\n" + + " \n" + + " yeah\n" + + " \n" + + "\n"; + + PrintWriter o = new PrintWriter(out); + o.println(str); + o.flush(); + o.close(); + out.flush(); + out.close(); + } catch (Exception e) { + String error = + e.getClass().getName() + ": " + e.getMessage(); + throw new RuntimeException(error); + } + } + }; + + t.start(); + + DOMParser parser = new DOMParser(); + parser.parse(new InputSource(in)); + Document doc = parser.getDocument(); + org.w3c.dom.Element root = doc.getDocumentElement(); + + t.join(); + + System.out.println("All done!"); + } +} // end class \ No newline at end of file diff --git a/tests/bugs/bootstrapClasspath/xerces.jar b/tests/bugs/bootstrapClasspath/xerces.jar new file mode 100644 index 000000000..7410f0c33 Binary files /dev/null and b/tests/bugs/bootstrapClasspath/xerces.jar differ diff --git a/tests/mikTests.xml b/tests/mikTests.xml new file mode 100644 index 000000000..111011c01 --- /dev/null +++ b/tests/mikTests.xml @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file