ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs/optional/junit JUnitReportTest.java
Date Tue, 21 Jun 2005 11:53:44 GMT
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  Changes    Path
  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 -0000	1.2
  +++ junitreport.xml	21 Jun 2005 11:53:44 -0000	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 -0000	1.9
  +++ JUnitReportTest.java	21 Jun 2005 11:53:44 -0000	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: DOEG<br/>")
  +                   > -1);
  +        } finally {
  +            FileUtils.close(r);
  +        }
  +    }
  +
   }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message