<?xml version="1.0" encoding="UTF-8"?>
<test id="wmlscriptlib/string/format/d/7" class="A" scope="wmlscriptlib" testtype="application" type="auto" source="wmlssl12#9.16" device="both">
  <assertion>When the String.format function is called with parameters string "Format", a decimal integer "Value" and the "Format" contains a format specifier of the form "%w.pd" and "p" is a negative decimal integer, the function returns '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[extern function main(myvar,next) {
	var result = 'fail';
	var fstring = "test %.-2d string";

	if (!isvalid(String.format(fstring, 1234))) {
		result = 'pass';
	}
	WMLBrowser.setVar(myvar, result);
	WMLBrowser.go('#' + next);
	return 1;
}
]]>
    </script>
  </scripts>
</test>

