ovidiu      02/04/03 22:43:21

  Modified:    src/scratchpad/schecoon/tests/anteater calc.xml
  Log:
  Complete test for the JavaScript+continuations version of the calculator.
  
  Revision  Changes    Path
  1.2       +36 -1     xml-cocoon2/src/scratchpad/schecoon/tests/anteater/calc.xml
  
  Index: calc.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/schecoon/tests/anteater/calc.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- calc.xml  3 Apr 2002 21:24:20 -0000       1.1
  +++ calc.xml  4 Apr 2002 06:43:21 -0000       1.2
  @@ -4,7 +4,11 @@
   
     <taskdef resource="META-INF/Anteater.tasks"/>
   
  -  <property name="schecoon" value="http://localhost:8090/schecoon"/>
  +  <property name="host" value="localhost"/>
  +  <property name="port" value="8080"/>
  +  <property name="base" value="schecoon"/>
  +
  +  <property name="schecoon" value="http://${host}:${port}/${base}"/>
   
     <target name="calc.js">
       <http description="Test the 'calc' JavaScript implementation">
  @@ -35,6 +39,37 @@
         </httpRequest>
         <echo>result = ${result}</echo>
       </http>
  +
  +    <http description="Simulate going back in the browser">
  +      <httpRequest href="${schecoon}/calc/kont/${cont2}">
  +        <parameter name="b" value="4"/>
  +        <match>
  +          <xpath select="html/form/@action" assign="cont4"/>
  +        </match>
  +      </httpRequest>
  +      <httpRequest href="${schecoon}/calc/kont/${cont4}">
  +        <parameter name="operator" value="minus"/>
  +        <match>
  +          <xpath select="html/form/p[contains(text(),'Result')]/b"
  +              value="-3.0"
  +              assign="result"/>
  +        </match>
  +      </httpRequest>
  +      <echo>result = ${result}</echo>
  +    </http>
  +
  +    <http description="Simulate going back again in the browser">
  +      <httpRequest href="${schecoon}/calc/kont/${cont4}">
  +        <parameter name="operator" value="divide"/>
  +        <match>
  +          <xpath select="html/form/p[contains(text(),'Result')]/b"
  +              value="0.25"
  +              assign="result"/>
  +        </match>
  +      </httpRequest>
  +      <echo>result = ${result}</echo>
  +    </http>
  +
     </target>
   
     <target name="test" depends="calc.js"/>
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to