<?xml version="1.0" encoding="UTF-8"?>
<test id="wmlscriptlib/string/format/s/2" 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 string "Value" and the "Format" contains a format specifier of the form "%ws" and the number of characters in the string "Value" is less than the specified width "w", the function replaces the "%ws" with a representation of the string "Value" with blanks added to the left until the minimum width is reached in the string it returns.
</assertion>
  <specnote>using %9s and the value "string", the test checks "&lt;space&gt;&lt;space&gt;&lt;space&gt;string" is returned.</specnote>
  <results>
    <result>
      <name>test</name>
      <value>pass</value>
    </result>
  </results>
  <strings>
    <string id="1">String.format("test %9s string", "string") == "test    string string"
</string>
  </strings>
  <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';
	if (<string1>) {
		result = 'pass';
	}
	WMLBrowser.setVar(myvar, result);
	WMLBrowser.go('#' + next);
	return 1;
}
]]>
    </script>
  </scripts>
</test>

