jvanzyl     00/10/03 10:01:58

  Modified:    testbed  directive.vm foreach-array.vm foreach-method.vm
                        foreach-variable.vm foreach-vector.vm fp1.vm
                        sample.vm test.sh test.vm
  Added:       testbed  testall.sh
  Log:
  - change all testbed templates to match new syntax.
  
  Revision  Changes    Path
  1.2       +2 -23     jakarta-velocity/testbed/directive.vm
  
  Index: directive.vm
  ===================================================================
  RCS file: /home/cvs/jakarta-velocity/testbed/directive.vm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- directive.vm      2000/09/30 17:04:30     1.1
  +++ directive.vm      2000/10/03 17:01:49     1.2
  @@ -1,26 +1,5 @@
   this is a dynamic directive!
   
  -#block $foo to $bar
  +#dummy ($foo $bar)
   
  -    monkey
  -
  -    #foreach $element in $list
  -        go baby $element
  -    #end        
  -
  -#end
  -
  -
  -#line $foo $bar
  -
  -#line $wonder
  -
  -#block $foo inthe $bar
  -
  -    run this block
  -    
  -#end    
  -
  -#while ($foo > 1)
  -    do this
  -#end    
  +#dummy ($wonder)
  
  
  
  1.2       +1 -1      jakarta-velocity/testbed/foreach-array.vm
  
  Index: foreach-array.vm
  ===================================================================
  RCS file: /home/cvs/jakarta-velocity/testbed/foreach-array.vm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- foreach-array.vm  2000/09/30 17:04:30     1.1
  +++ foreach-array.vm  2000/10/03 17:01:50     1.2
  @@ -1,7 +1,7 @@
   Foreach with an array.
   
   <table>
  -#foreach $provider in $provider.Array
  +#foreach ($provider in $provider.Array)
       <tr>
           <td>This is $provider</td>
       </tr>        
  
  
  
  1.2       +1 -1      jakarta-velocity/testbed/foreach-method.vm
  
  Index: foreach-method.vm
  ===================================================================
  RCS file: /home/cvs/jakarta-velocity/testbed/foreach-method.vm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- foreach-method.vm 2000/09/30 17:04:30     1.1
  +++ foreach-method.vm 2000/10/03 17:01:50     1.2
  @@ -1,5 +1,5 @@
   Foreach with a method.
   
  -#foreach $provider in $provider.getCustomers()
  +#foreach ($provider in $provider.getCustomers())
       This is $provider.
   #end
  
  
  
  1.2       +1 -1      jakarta-velocity/testbed/foreach-variable.vm
  
  Index: foreach-variable.vm
  ===================================================================
  RCS file: /home/cvs/jakarta-velocity/testbed/foreach-variable.vm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- foreach-variable.vm       2000/09/30 17:04:30     1.1
  +++ foreach-variable.vm       2000/10/03 17:01:51     1.2
  @@ -1,5 +1,5 @@
   Foreach with a variable.
   
  -#foreach $provider in $list
  +#foreach ($provider in $list)
       This is $provider.
   #end
  
  
  
  1.2       +1 -1      jakarta-velocity/testbed/foreach-vector.vm
  
  Index: foreach-vector.vm
  ===================================================================
  RCS file: /home/cvs/jakarta-velocity/testbed/foreach-vector.vm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- foreach-vector.vm 2000/09/30 17:04:30     1.1
  +++ foreach-vector.vm 2000/10/03 17:01:51     1.2
  @@ -1,5 +1,5 @@
   Foreach with a vector
   
  -#foreach $provider in $provider.Vector
  +#foreach ($provider in $provider.Vector)
       This is the $provider.
   #end
  
  
  
  1.2       +1 -1      jakarta-velocity/testbed/fp1.vm
  
  Index: fp1.vm
  ===================================================================
  RCS file: /home/cvs/jakarta-velocity/testbed/fp1.vm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- fp1.vm    2000/09/30 17:04:30     1.1
  +++ fp1.vm    2000/10/03 17:01:51     1.2
  @@ -5,6 +5,6 @@
   ## was flush with the left margin
   ## that's fixed now.
   
  -#foreach $name in $list
  +#foreach ($name in $list)
       $name
   #end    
  
  
  
  1.2       +1 -1      jakarta-velocity/testbed/sample.vm
  
  Index: sample.vm
  ===================================================================
  RCS file: /home/cvs/jakarta-velocity/testbed/sample.vm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- sample.vm 2000/09/30 17:04:30     1.1
  +++ sample.vm 2000/10/03 17:01:52     1.2
  @@ -11,7 +11,7 @@
               Names
           </td>
       </tr>
  -    #foreach $name in $list
  +    #foreach ($name in $list)
       <tr>
           <td bgcolor="#eeeeee">$name</td>
       </tr>
  
  
  
  1.2       +1 -1      jakarta-velocity/testbed/test.sh
  
  Index: test.sh
  ===================================================================
  RCS file: /home/cvs/jakarta-velocity/testbed/test.sh,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- test.sh   2000/09/30 17:04:30     1.1
  +++ test.sh   2000/10/03 17:01:52     1.2
  @@ -7,4 +7,4 @@
       CLASSPATH=${CLASSPATH}:${jar}
   done
   
  -java -cp ${CLASSPATH} org.apache.velocity.test.Test $1 > output
  +java -cp ${CLASSPATH} org.apache.velocity.test.Test $1 > output 2>&1
  
  
  
  1.2       +28 -5     jakarta-velocity/testbed/test.vm
  
  Index: test.vm
  ===================================================================
  RCS file: /home/cvs/jakarta-velocity/testbed/test.vm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- test.vm   2000/09/30 17:04:30     1.1
  +++ test.vm   2000/10/03 17:01:52     1.2
  @@ -19,11 +19,12 @@
   
   $100
   
  +
   #set $foo = "bar"
   
  +This is the $foo way.
   
   
  -This is the $foo way.
   
   #if ($foo)
       This is $bar.
  @@ -41,6 +42,8 @@
       This is the else.
   #end
   
  +
  +
   \#set \$foo = "bar"
   
   \$foo   => $foo
  @@ -56,6 +59,8 @@
   \$foo-x => $foo-x
   \$foo$  => $foo$
   
  +
  +
   #set $iam-cool = "jon"
   $iam-cool
   $!nada nothing here
  @@ -91,6 +96,8 @@
   
   <!-- This is an HTML comment -->
   
  +
  +
   $provider2.Title
   
   #set $a = "x"
  @@ -101,27 +108,39 @@
   
   <input type="text" name="email" value="">
   
  +
   #set $c = $provider.Title
   $c
   
  +
   #set $d = $provider.getTitle()
   $d
   
  +
   #set $provider.Title = "crocodile hunter!"
   
  +
  +
   $provider.Title
   
  +
  +
   <!-- look here -->
   
   #set $provider.Title = $d
   $provider.Title
   
  +
  +
   #set $provider.Title = $provider.Name
   $provider.Title
   
  +
   #set $provider.Title = $provider.getName()
   $provider.Title
   
  +
  +
   #set $a = true
   
   #set $b = false
  @@ -131,6 +150,7 @@
   #set $provider.State = false
   
   
  +
   #if ($provider.StateTrue)
       This is a property that returns a boolean
       value of true.
  @@ -142,29 +162,32 @@
   
   Foreach with a variable.
   
  -#foreach $provider in $list
  +#foreach ($provider in $list)
       This is $provider.
   #end
   
  +
   Foreach with an array.
   
   <table>
  -#foreach $provider in $provider.Array
  +#foreach ($provider in $provider.Array)
       <tr>
           <td>This is $provider</td>
       </tr>        
   #end
   </table>
   
  +
   
  -#foreach $provider in $provider.Vector
  +#foreach ($provider in $provider.Vector)
       This is the $provider.
   #end
   
   
  +
   Foreach with a method.
   
  -#foreach $provider in $provider.getCustomers()
  +#foreach ($provider in $provider.getCustomers())
       This is $provider.
   #end
   
  
  
  
  1.1                  jakarta-velocity/testbed/testall.sh
  
  Index: testall.sh
  ===================================================================
  #!/bin/sh
  
  TESTDIR=testdir
  TESTLOG=test.log
  
  [ -d ${TESTDIR} ] && rm -rf ${TESTDIR}
  [ -f ${TESTLOG} ] && rm -f ${TESTLOG}
  mkdir ${TESTDIR}
  
  for template in *.vm
  do
      echo ${template} >> ${TESTLOG}
      ./test.sh $template
      mv output ${TESTDIR}/${template}.output
      mv velocity.log ${TESTDIR}/${template}.log
  done    
  
  grep Exception ${TESTDIR}/*.output > error
  
  
  

Reply via email to