<?xml version="1.0" encoding="UTF-8"?>
<!--

  $Author: richard $

  $Revision: 1.8 $

  $Log: 1,v $
  Revision 1.8  2002/06/16 09:44:28  richard
  simplifies the test

  Revision 1.7  2002/04/25 14:15:47  richard
  missing quotes

  Revision 1.6  2002/04/23 10:31:00  richard
  / was placed in the wrong place

  Revision 1.5  2002/04/19 16:13:21  richard
  autofailed, missing / or extra / on wml:carcd element
  move the fragment into a page document

  Revision 1.4  2002/02/27 14:57:03  richard
  rewrite tests,correct bug, pass as auto

  Revision 1.3  2001/10/30 16:22:49  gb
  Modified all the test files in the wml2 directory such that it puts the <?xml?> declaration back at the top of the file, before the comment.

  Revision 1.2  2001/10/08 21:56:27  gb
  Added the standard header of Author, Revision and Log at the top of each template file.


-->
<test id="wml2/uabehaviour/navigationreference/prevtask/1" class="A" scope="wml2" 
	testtype="application" type="auto" source="wml2#5.3.2" device="both">
  <assertion>When the WML:PREV task is executed, and it contains WML:SETVAR elements, 
  the variable name and value in each WML:SETVAR element must be converted into 
  a simple string by substituting all referenced variables.
  </assertion>
  <specnote>Create a card(c1) that sets two variables on entry, using the 
  WML:SETVAR element within a WML:GO element going to a second card. 
  The second card(c2) could contain an ONENTERFORWARD event that contains a 
  WML:PREV task that sets a variable with the WML:SETVAR element and then 
  returns to the first card(c1). 
  The parameter values for the variable will be the variables that were previously 
  set. Make sure you are automaticall taken 
  back to the current card, and that the variable is displayed .
  </specnote>
  <results>
    <result ci="true">
      <name>test</name>
      <value>two</value>
    </result>
  </results>
	<method>
		<![CDATA[
  		<wml:card newcontext="true" id="main">
    		<wml:onevent type="enterforward">
      		<wml:go href="#card2">
        		<wml:setvar name="x" value="one"/>
        		<wml:setvar name="y" value="two"/>
      		</wml:go>
    		</wml:onevent>
    		<wml:onevent type="enterbackward">
    			<wml:go href="[[resulturl]]">
     	 			<wml:postfield name="test" value="$one" />
					[[sessionvars]]
    			</wml:go>
        </wml:onevent>
				[[auto_failed]]
  		</wml:card>
  		<wml:card id="card2">
    		<wml:onevent type="enterforward">
      		<wml:prev>
		        <wml:setvar name="$x" value="$y" />
      		</wml:prev>
    		</wml:onevent>
				[[auto_failed]]
      </wml:card>
		]]>
  </method>
</test>
