<?xml version="1.0" encoding="UTF-8"?>
<test id="wmlscriptlib/lang/abort/2" class="B" scope="wmlscriptlib" testtype="application" type="auto" source="wmlssl12#7.12" device="both">
  <assertion>When the Lang.abort function is called with a non-string as a parameter,
execution of the script is aborted and control is returned to the caller of the WMLScript Interpreter with the return value being 'invalid'.
</assertion>
  <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();
	result = 'fail';
	WMLBrowser.setVar(myvar, result);
	return 1;
}
]]>
    </script>
    <script id="2">
      <![CDATA[extern function other() {
	Lang.abort(invalid);
	return 'fail';
}
]]>
    </script>
  </scripts>
</test>

