You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by js...@apache.org on 2002/09/17 17:52:12 UTC

cvs commit: jakarta-commons-sandbox/jelly/src/test/org/apache/commons/jelly jellyunit.jelly

jstrachan    2002/09/17 08:52:12

  Modified:    jelly/src/test/org/apache/commons/jelly jellyunit.jelly
  Log:
  patched the sample jellyunit script so that it runs all current JellyUnit scripts that can be found
  
  Revision  Changes    Path
  1.2       +24 -4     jakarta-commons-sandbox/jelly/src/test/org/apache/commons/jelly/jellyunit.jelly
  
  Index: jellyunit.jelly
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/test/org/apache/commons/jelly/jellyunit.jelly,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- jellyunit.jelly	17 Sep 2002 15:31:03 -0000	1.1
  +++ jellyunit.jelly	17 Sep 2002 15:52:12 -0000	1.2
  @@ -1,8 +1,28 @@
   <?xml version="1.0"?>
  -<j:jelly xmlns:j="jelly:core" xmlns:test="jelly:junit">
  +<j:jelly xmlns:j="jelly:core" xmlns:test="jelly:junit" xmlns:ant="jelly:ant">
   
  -  <!-- try an absolute path -->
  -  <j:include uri="/src/test/org/apache/commons/jelly/junit/suite.jelly"/>
  +  <ant:fileScanner var="scanner">
  +    <ant:fileset dir="src/test" includes="**/suite.jelly"/>
  +  </ant:fileScanner>
   
  -	<test:run/>  
  +	<j:if test="${empty outputfile}">
  +			<j:set var="outputfile" value="target/jellyunit.xml"/>
  +  </j:if>
  +  
  +  <ant:echo>Running all JellyUnit tests and generating file ${outputfile}</ant:echo>
  +  	
  +	<j:file name="${outputfile}">
  +		<tests>
  +		  <j:forEach var="file" items="${scanner.iterator()}">
  +	
  +		  	<j:set var="uri" value="${file.toURL().toString()}"/>
  +		  	
  +		  	<suite uri="${uri}">
  +		  		<j:include uri="${uri}"/>
  +					<test:run/>  	
  +				</suite>	
  +						
  +		  </j:forEach>
  +		</tests>
  +	</j:file>		
   </j:jelly>
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>