commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject cvs commit: jakarta-commons-sandbox/jelly/src/test/org/apache/commons/jelly/util suite.jelly
Date Thu, 10 Oct 2002 11:11:23 GMT
jstrachan    2002/10/10 04:11:23

  Modified:    jelly/src/test/org/apache/commons/jelly/util suite.jelly
  Log:
  Added some extra working tests that use the Jexl size() function.
  
  Revision  Changes    Path
  1.2       +11 -3     jakarta-commons-sandbox/jelly/src/test/org/apache/commons/jelly/util/suite.jelly
  
  Index: suite.jelly
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/test/org/apache/commons/jelly/util/suite.jelly,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- suite.jelly	10 Oct 2002 10:24:32 -0000	1.1
  +++ suite.jelly	10 Oct 2002 11:11:23 -0000	1.2
  @@ -9,9 +9,13 @@
   	
   		<util:tokenize var="tokens" delim=",">Test1,Test2,Test3,Test4</util:tokenize>
   
  +		<j:set var="s" value="${size(tokens)}"/>		
  +		<test:assert test="${s == 4}"/>
  +		<test:assert test="${size(tokens) == 4}"/>
  +
   <!--		
  -		<j:set var="size" value="${tokens.size()}"/>		
  -		<test:assert test="${size == 4}"/>
  +		<j:set var="s" value="${tokens.size()}"/>		
  +		<test:assert test="${s == 4}"/>
   		
   		<test:assert test="${tokens.size() == 4}"/>
   -->
  @@ -21,8 +25,12 @@
   		<test:assertEquals expected="Test3" actual="${tokens[2]}"/>
   		<test:assertEquals expected="Test4" actual="${tokens[3]}"/>
   		
  +		<test:assertEquals expected="Test4" actual="${tokens[s - 1]}"/>
  +		<test:assertEquals expected="Test4" actual="${tokens[size(tokens) - 1]}"/>
  +		
   <!--		
  -		<test:assertEquals expected="Test4" actual="${tokens[size]}"/>
  +		<test:assertEquals expected="Test4" actual="${tokens.get(size(tokens) - 1)}"/>
  +		
   		
   		<test:assertEquals expected="Test4" actual="${tokens[tokens.size() - 1]}"/>
   		<test:assertEquals expected="Test4" actual="${tokens.get(tokens.size() - 1)}"/>
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message