kaz         02/03/17 09:19:44

  Modified:    src/dvsl/xdocs junit.dvsl
  Log:
  Modified the DVSL stylesheet to only generate a report if unit tests
  exist.  If no unit tests exist, then the junit-report displays a simple
  message indicating no unit tests existed.
  
  Revision  Changes    Path
  1.2       +32 -17    jakarta-turbine-maven/src/dvsl/xdocs/junit.dvsl
  
  Index: junit.dvsl
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/src/dvsl/xdocs/junit.dvsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- junit.dvsl        11 Mar 2002 20:20:38 -0000      1.1
  +++ junit.dvsl        17 Mar 2002 17:19:44 -0000      1.2
  @@ -9,7 +9,7 @@
   ##
   ## Based on the XSL stylesheet junit-noframes.xsl from Ant.
   ##
  -## Version: $Id: junit.dvsl,v 1.1 2002/03/11 20:20:38 jvanzyl Exp $
  +## Version: $Id: junit.dvsl,v 1.2 2002/03/17 17:19:44 kaz Exp $
   
   #######################################################################
   ## G L O B A L    V A R I A B L E S                                  ##
  @@ -78,23 +78,9 @@
       </code>
   #end
   
  -#######################################################################
  -## T E M P L A T E    D E F I N I T I O N S                          ## 
  -####################################################################### 
  -
  -## Matches the root element of the JUnit XML report.
  +## Generates the report if unit tests were present.
   ##
  -#match ("testsuites")
  -<?xml version="1.0"?>
  -<document>
  -
  -  <properties>
  -    <title>JUnit Test Results</title>
  -  </properties>
  -
  -  <body>
  -    ###################################################################
  -    <section name="Unit Test Results">
  +#macro (generateReport)
         #navbar ()
         <p>
           The following document contains the results of the <a
  @@ -215,6 +201,35 @@
         </subsection>
         #end
       </section>
  +#end
  +
  +#######################################################################
  +## T E M P L A T E    D E F I N I T I O N S                          ## 
  +####################################################################### 
  +
  +## Matches the root element of the JUnit XML report.
  +##
  +#match ("testsuites")
  +<?xml version="1.0"?>
  +<document>
  +
  +  <properties>
  +    <title>JUnit Test Results</title>
  +  </properties>
  +
  +  <body>
  +    <section name="Unit Test Results">
  +
  +    #if (! $node.get("testsuite"))
  +      <p>
  +        This project does not have contain any unit tests.
  +      </p>
  +    </section>
  +    #else
  +        #generateReport()
  +    #end
  +
     </body>
   </document>
   #end
  +
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to