cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs/optional/junit JUnitReportTest.java
bodewig 2005/06/21 04:53:44 Modified:src/etc/testcases/taskdefs/optional junitreport.xml src/testcases/org/apache/tools/ant/taskdefs/optional/junit JUnitReportTest.java Log: Unit test for 34963 Revision ChangesPath 1.3 +10 -0 ant/src/etc/testcases/taskdefs/optional/junitreport.xml Index: junitreport.xml === RCS file: /home/cvs/ant/src/etc/testcases/taskdefs/optional/junitreport.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- junitreport.xml 13 May 2005 21:42:23 - 1.2 +++ junitreport.xml 21 Jun 2005 11:53:44 - 1.3 @@ -66,4 +66,14 @@ target name=clean delete dir=${outputdir}/ /target + + target name=testStackTraceLineBreaks +mkdir dir=${outputdir}/html/ +junitreport todir=${outputdir} + fileset dir=${jrdir} +include name=TEST-*.xml/ + /fileset + report todir=${outputdir}/html/ +/junitreport + /target /project 1.10 +18 -0 ant/src/testcases/org/apache/tools/ant/taskdefs/optional/junit/JUnitReportTest.java Index: JUnitReportTest.java === RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/optional/junit/JUnitReportTest.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- JUnitReportTest.java 13 May 2005 21:54:14 - 1.9 +++ JUnitReportTest.java 21 Jun 2005 11:53:44 - 1.10 @@ -18,7 +18,9 @@ package org.apache.tools.ant.taskdefs.optional.junit; import java.io.File; +import java.io.FileReader; import org.apache.tools.ant.BuildFileTest; +import org.apache.tools.ant.util.FileUtils; /** * Small testcase for the junitreporttask. @@ -88,5 +90,21 @@ XMLResultAggregator.WARNING_INVALID_ROOT_ELEMENT); } +// Bugzilla Report 34963 +public void XtestStackTraceLineBreaks() throws Exception { +expectReportWithText(testStackTraceLineBreaks, null); +FileReader r = null; +try { +r = new FileReader(new File(System.getProperty(root), + src/etc/testcases/taskdefs/optional/junitreport/test/html/sampleproject/coins/0_CoinTest.html)); +String report = FileUtils.readFully(r); +assertTrue(output must contain br, + report.indexOf(junit.framework.AssertionFailedError: DOEGbr/) +-1); +} finally { +FileUtils.close(r); +} +} + } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs/optional/junit JUnitReportTest.java
bodewig 2005/06/21 05:09:06 Modified:src/testcases/org/apache/tools/ant/taskdefs/optional/junit JUnitReportTest.java Log: fix PR 34963, create br/ in stack-traces Revision ChangesPath 1.11 +1 -1 ant/src/testcases/org/apache/tools/ant/taskdefs/optional/junit/JUnitReportTest.java Index: JUnitReportTest.java === RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/optional/junit/JUnitReportTest.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- JUnitReportTest.java 21 Jun 2005 11:53:44 - 1.10 +++ JUnitReportTest.java 21 Jun 2005 12:09:06 - 1.11 @@ -91,7 +91,7 @@ } // Bugzilla Report 34963 -public void XtestStackTraceLineBreaks() throws Exception { +public void testStackTraceLineBreaks() throws Exception { expectReportWithText(testStackTraceLineBreaks, null); FileReader r = null; try { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs/optional/junit JUnitReportTest.java
--- Stefan Bodewig [EMAIL PROTECTED] wrote: On Sat, 14 May 2005, Steve Loughran [EMAIL PROTECTED] wrote: we could use .toURL, which probably works better across platforms. Our own FileUtils version works even better than that. I'm behind on email, but I'm glad somebody else said this... :) -Matt Stefan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Yahoo! Mail Stay connected, organized, and protected. Take the tour: http://tour.mail.yahoo.com/mailtour.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs/optional/junit JUnitReportTest.java
On Sat, 14 May 2005, Steve Loughran [EMAIL PROTECTED] wrote: we could use .toURL, which probably works better across platforms. Our own FileUtils version works even better than that. Stefan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs/optional/junit JUnitReportTest.java
Stephane Bailliez wrote: [EMAIL PROTECTED] wrote: [...] -//XXX there seems to be a bug in xerces 1.3.0 that doesn't like file object -// will investigate later. It does not use the given directory but -// the vm dir instead ? Works fine with crimson. -Document testsuiteDoc -= builder.parse(file:/// + files[i].getAbsolutePath()); Did u remove the comment on purpose ? A lot of water has been flowing since I wrote this so I guess it has been fixed but... I did, because those parsers are both so old, I deemed the problem moot. Xerces 1.3.0. It aint what we ship with ;) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs/optional/junit JUnitReportTest.java
Alexey Solofnenko wrote: We do not support 1.1 any more. - Alexey. On 5/13/05, Stephane Bailliez [EMAIL PROTECTED] wrote: Alexey Solofnenko wrote: Another, question - why not to use File.toURL() method instead? JDK 1.2+ method. (yeah sounds like it was last century :) I think I was the first person to look at the file for a while. Yes, we could use .toURL, which probably works better across platforms. -steve. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs/optional/junit JUnitReportTest.java
stevel 2005/05/13 14:42:23 Modified:src/etc/testcases/taskdefs/optional junitreport.xml src/main/org/apache/tools/ant/taskdefs/optional/junit XMLResultAggregator.java src/testcases/org/apache/tools/ant/taskdefs/optional/junit JUnitReportTest.java Added: src/etc/testcases/taskdefs/optional/junitreport INCOMPLETE-sampleproject.incomplete.xml NAMESPACE-sampleproject.namespace.xml WRONGELEMENT-sampleproject.wrongelement.xml ZEROBYTES-sampleproject.package.xml Log: tests for junitreport handling various forms of bad data, plus explicit handling of zero-byte files with a different error message.. Revision ChangesPath 1.1 ant/src/etc/testcases/taskdefs/optional/junitreport/INCOMPLETE-sampleproject.incomplete.xml Index: INCOMPLETE-sampleproject.incomplete.xml === ?xml version=1.0 encoding=UTF-8 ? testsuite errors=0 failures=0 name=sampleproject.incomplete tests=5 time=0.038 /properties testcase name=testEquals time=0.0/testcase testcase name=testHashCode time=0.0/testcase testcase name=testToString time=0.0010/testcase testcase name=testgetUniqueString time=0.0/testcase testcase name=testSerialization time=0.024/testcase system-out![CDATA[testEquals testHashCode testToString testgetUniqueString testSerialization ]]/system-out system-err 1.1 ant/src/etc/testcases/taskdefs/optional/junitreport/NAMESPACE-sampleproject.namespace.xml Index: NAMESPACE-sampleproject.namespace.xml === ?xml version=1.0 encoding=UTF-8 ? ns:testsuite errors=1 failures=1 name=sampleproject.namespace tests=11 time=0.171 xmlns:ns=funny-namespace properties property name=testsrc value=test//property property name=java.runtime.name value=Java(TM) 2 Runtime Environment, Standard Edition/property property name=sun.boot.library.path value=/usr/java/jdk1.3.1_03/jre/lib/i386/property property name=java.vm.version value=1.3.1_03-b03/property property name=ant.version value=Apache Ant version 1.5 compiled on July 9 2002/property property name=ant.java.version value=1.3/property property name=java.vm.vendor value=Sun Microsystems Inc./property property name=java.vendor.url value=http://java.sun.com/;/property property name=path.separator value=:/property property name=java.vm.name value=Java HotSpot(TM) Client VM/property property name=file.encoding.pkg value=sun.io/property property name=classes value=classes/property property name=java.vm.specification.name value=Java Virtual Machine Specification/property property name=user.dir value=/home/jkf/programming/gretant_sourceforge/sampleproject/property property name=java.runtime.version value=1.3.1_03-b03/property property name=java.awt.graphicsenv value=sun.awt.X11GraphicsEnvironment/property property name=basedir value=/home/jkf/programming/gretant_sourceforge/sampleproject/property property name=os.arch value=i386/property property name=java.io.tmpdir value=/tmp/property property name=line.separator value= /property property name=java.vm.specification.vendor value=Sun Microsystems Inc./property property name=java.awt.fonts value=/property property name=os.name value=Linux/property property name=ant.home value=/opt/jakarta-ant-1.5//property property name=ant.project.name value=sample/property property name=reportdir value=reports/property property name=java.library.path value=/usr/java/jdk1.3.1_03/jre/lib/i386:/usr/java/jdk1.3.1_03/jre/lib/i386/native_threads/:/usr/java/jdk1.3.1_03/jre/lib/i386/client:/usr/java/jdk1.3.1_03/jre/../lib/i386/property property name=src value=code//property property name=debug value=on/property property name=java.specification.name value=Java Platform API Specification/property property name=java.class.version value=47.0/property property name=os.version value=2.4.18-5/property property name=ant.file value=/home/jkf/programming/gretant_sourceforge/sampleproject/build.xml/property property name=unitreport value=cl-unit.xml/property property name=user.home value=/home/jkf/property property name=user.timezone value=Europe/Amsterdam/property property name=java.awt.printerjob value=sun.awt.motif.PSPrinterJob/property property name=java.specification.version value=1.3/property property name=file.encoding value=ISO-8859-15/property property name=java.class.path
cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs/optional/junit JUnitReportTest.java
stevel 2005/05/13 14:54:14 Modified:src/testcases/org/apache/tools/ant/taskdefs/optional/junit JUnitReportTest.java Log: and of course the date change. Revision ChangesPath 1.9 +1 -1 ant/src/testcases/org/apache/tools/ant/taskdefs/optional/junit/JUnitReportTest.java Index: JUnitReportTest.java === RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/optional/junit/JUnitReportTest.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- JUnitReportTest.java 13 May 2005 21:42:23 - 1.8 +++ JUnitReportTest.java 13 May 2005 21:54:14 - 1.9 @@ -1,5 +1,5 @@ /* - * Copyright 2002,2004 The Apache Software Foundation + * Copyright 2002,2005 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs/optional/junit JUnitReportTest.java
[EMAIL PROTECTED] wrote: [...] -//XXX there seems to be a bug in xerces 1.3.0 that doesn't like file object -// will investigate later. It does not use the given directory but -// the vm dir instead ? Works fine with crimson. -Document testsuiteDoc -= builder.parse(file:/// + files[i].getAbsolutePath()); Did u remove the comment on purpose ? A lot of water has been flowing since I wrote this so I guess it has been fixed but... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs/optional/junit JUnitReportTest.java
Another, question - why not to use File.toURL() method instead? - Alexey. On 5/13/05, Stephane Bailliez [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: [...] - //XXX there seems to be a bug in xerces 1.3.0 that doesn't like file object - // will investigate later. It does not use the given directory but - // the vm dir instead ? Works fine with crimson. - Document testsuiteDoc - = builder.parse(file:/// + files[i].getAbsolutePath()); Did u remove the comment on purpose ? A lot of water has been flowing since I wrote this so I guess it has been fixed but... -- Alexey N. Solofnenko trelony at gmail.com http://gmail.com home: http://trelony.cjb.net/ Pleasant Hill, CA (GMT-8 hours usually)
Re: cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs/optional/junit JUnitReportTest.java
Alexey Solofnenko wrote: Another, question - why not to use File.toURL() method instead? JDK 1.2+ method. (yeah sounds like it was last century :) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs/optional/junit JUnitReportTest.java
We do not support 1.1 any more. - Alexey. On 5/13/05, Stephane Bailliez [EMAIL PROTECTED] wrote: Alexey Solofnenko wrote: Another, question - why not to use File.toURL() method instead? JDK 1.2+ method. (yeah sounds like it was last century :) -- Alexey N. Solofnenko trelony at gmail.com http://gmail.com home: http://trelony.cjb.net/ Pleasant Hill, CA (GMT-8 hours usually)
Re: cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs/optional/junit JUnitReportTest.java
Alexey Solofnenko wrote: We do not support 1.1 any more. Yes, but at that time we were. :) toURL does not properly escape illegal characters (see javadoc) so you end up kind of like my horrible current hack. I just checked jaxp implementation, the current implementation in the main branch (jaxp 1.3) for parse(File) is still wrong as well AFAIK, it is different between from the one in the tck-jaxp-1_2_0 branch which does escape. mmm... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]