<?xml version="1.0" encoding="UTF-8"?>
<test id="wmlscriptlib/lang/abort/1" class="B" scope="wmlscriptlib" testtype="application" type="auto" source="wmlssl12#7.12" device="both">
  <assertion>When the Lang.abort function is called with a string as the parameter,
execution of the script is aborted and control is returned to the caller of the WMLScript interpreter with the return value being the value of the string parameter.
</assertion>
  <notes>Changed to assume that when abort is called, it totally terminates the
execution of WMLScript.</notes>
  <results>
    <result>
      <name>test</name>
      <value>pass</value>
    </result>
  </results>
  <method>
    <![CDATA[<card newcontext="true" id="main">
<onevent type="onenterforward">
<go href="<script1>#main('test','card1')"/>
</onevent>
<auto_failed>
</card>]]>
  </method>
  <cards>
    <card id="1">
      <![CDATA[<card id="card1">
<onevent type="onenterforward">
<go href="<resulturl>">
<postfield name="test" value="$test"/>
<sessionvars>
</go>
</onevent>
<auto_failed>
</card>
]]>
    </card>
  </cards>
  <scripts>
    <script id="1">
      <![CDATA[use url script2 "<script2>";

extern function main(myvar,next) {
	var result = 'pass';

	WMLBrowser.setVar(myvar, result);
	WMLBrowser.go('#' + next);
	result = script2#other("pass");
 	result = 'fail';
	WMLBrowser.setVar(myvar, result);
	return 1;
}
]]>
    </script>
    <script id="2">
      <![CDATA[extern function other(message) {
	Lang.abort(message);
	return 'fail';
}
]]>
    </script>
  </scripts>
</test>

