Roxen.git / server / etc / test / tests / rxml / RoxenTest_RXMLTags.xml

version» Context lines:

Roxen.git/server/etc/test/tests/rxml/RoxenTest_RXMLTags.xml:1:   <?xml version="1.0" encoding="iso-8859-1"?>    + <!-- +  All <add-module> statements must precede the p-code tests since +  altering the configuration bumps the RXML generation counter and +  invalidates earlier p-code. Likewise <drop-module> statements should +  follow all tests. +  +  <drop-module> is a no-op in test pass #1, and same for <add-module> +  in pass #2, so the pass loop won't affect p-code generation. + --> +  + <add-module>html_wash</add-module> +  +  +    <!-- ............................................................ --> -  + <comment>wash-html</comment> +  + <test> +  <rxml> +  <wash-html keep-tags="br" keep-containers="h1,p" close-tags="yes"><h1>Foo</h1><p>bar <a href="A">A</a>.<br/>C.</p></wash-html> +  </rxml> +  <result><h1>Foo</h1><p>bar &lt;a href="A"&gt;A&lt;/a&gt;.<br/>C.</p></result> + </test> +  + <test> +  <rxml> +  <wash-html keep-tags="br" keep-containers="h1,p" close-tags="yes" remove-unwanted-tags="yes"><h1>Foo</h1><p>bar <a href="A">A</a>.<br/>C.</p></wash-html> +  </rxml> +  <result><h1>Foo</h1><p>bar A.<br/>C.</p></result> + </test> +  +  + <!-- ............................................................ -->   <comment>Config image</comment>   <test>   <rxml><configimage src="unit"/></rxml> - <result><img alt="unit" border="0" src="/internal-roxen-unit" /></result> + <result><img alt="unit" src="/internal-roxen-unit" /></result>   </test>      <test>   <rxml><configimage src="unit" noxml=''/></rxml> - <result><img alt="unit" border="0" src="/internal-roxen-unit"></result> + <result><img alt="unit" src="/internal-roxen-unit"></result>   </test>      <test>   <rxml><configimage alt=x border=1 src=fold class=a /></rxml>   <result><img alt="x" border="1" class="a" src="/internal-roxen-fold" /></result>   </test>         <!-- ............................................................ -->   <comment>Imgs</comment>
Roxen.git/server/etc/test/tests/rxml/RoxenTest_RXMLTags.xml:531:   <test>   <rxml><set variable='var.foo' value='x'/><default value=x name=a><input name=a><input type=checkbox value=x name=a><input type=radio value=x></default></rxml>   <result><input name=a><input checked="checked" name="a" type="checkbox" value="x" /><input type=radio value=x></result>   </test>      <test>   <rxml><set variable='var.foo' value='x'/><default value=x><input><input type=checkbox value=x><input type=radio value=x></default></rxml>   <result><input><input checked="checked" type="checkbox" value="x" /><input checked="checked" type="radio" value="x" /></result>   </test>    - <test no-canon="1"> + <test>   <rxml><set variable='var.foo' value='x'/><default value='foo bar'><select><option value='foo bar'></option></select></default></rxml>   <result><select><option value='foo bar' selected="selected"></option></select></result>   </test>      <test>   <rxml><set variable='var.foo' value='x'/><default value=x><select><OPtion>y<optIon>x</select></default></rxml>   <result><select><OPtion>y</OPtion><optIon selected="selected">x</optIon></select></result>   </test>      <test>
Roxen.git/server/etc/test/tests/rxml/RoxenTest_RXMLTags.xml:613:   <result><select><option value=a></option></select></result>   </test>      <test>   <rxml><set variable='var.foo' value='x'/><default value=x><select><option></select></default></rxml>   <result><select><option></option></select></result>   </test>      <test>   <rxml><set variable='var.foo' value='x'/><default value=g><select><option VALUE=g></option></select></default></rxml> - <result><select><option VALUE=g selected="selected"></option></select></result> + <result><select><option value=g selected="selected"></option></select></result>   </test>      <test>   <rxml><set variable='var.foo' value='x'/><default value='x'><select><option value='x'></option><option value='y'></option></select></default></rxml>   <result><select><option selected="selected" value='x'></option><option value='y'></option></select></result>   </test>      <test>   <rxml><set variable='var.foo' value='x'/><default value=a><select><option value=a></select></default></rxml>   <result><select><option selected="selected" value=a></option></select></result>   </test>    -  + <test> + <rxml><set variable='var.foo' value='x'/><default value=a><select>A<option value=a>B</select></default></rxml> + <result><select>A<option selected="selected" value=a>B</option></select></result> + </test>    -  + <test> + <rxml><set variable='var.foo' value='x'/><default value=x><select>A<option value="a"></option><option value="&var.foo;">B</option>&var.foo;</select></default></rxml> + <result><select>A<option value="a"></option><option selected="selected" value=x>B</option>x</select></result> + </test> +  + <test> + <rxml><set variable='var.foo' value='x'/><default value=b><select><option value="a" selected /><option value="b" /><option/></select></default></rxml> + <result><select><option value="a"></option><option selected="selected" value="b"></option><option></option></select></result> + </test> +  + <test> <!-- [bug 6425] --> +  <rxml type="string"> +  <define tag="form001"> +  <set variable="var.ro" value="write"/> +  <for from="1" to="2" variable="var.ix"> +  <maketag name="input" type="tag"> +  <if variable="var.ro"> +  <attrib name="readonly">READONLY</attrib> +  </if> +  </maketag> +  <unset variable="var.ro" /> +  </for> +  </define> +  <form001/> +  </rxml> +  <result> +  <input readonly='READONLY'/> +  <input/> +  </result> + </test> +  +    <!-- ............................................................ -->   <comment>Append</comment>      <test>    <rxml>    <set variable='var.foo' value='bar'/>    <append variable='var.bar' value='y'/>    &var.bar;    </rxml>    <result>y</result>
Roxen.git/server/etc/test/tests/rxml/RoxenTest_RXMLTags.xml:1235:      <test>    <rxml><replace from="x" to="&lt;x>">xx</replace></rxml>    <result><x><x></result>   </test>      <test>    <rxml><replace from="x" to="y"><br/>&lt;br/&gt;&amp;   &#33;&#34;&#35;&#36;&#37;&#38;&#39;&#59;&#60;&#61;&#62;</replace></rxml>    <result><br/>&lt;br/&gt;&amp; - !"#$%&#38;';&#60;=&#62;</result> + !&#34;#$%&#38;&#39;;&#60;=&#62;</result>   </test>         <!-- ............................................................ -->   <comment>substring</comment>      <test>    <rxml>    [<substring from="2" to="4">a b c </substring>]    [<substring from="4" to="2">a b c </substring>]
Roxen.git/server/etc/test/tests/rxml/RoxenTest_RXMLTags.xml:2702:    </cache>    </rxml>    <result pass="1">11</result>    <result pass="2">12</result>   </test>      <test>    <rxml type="string">    <cache>    &test.pass; +  <cache generation-variable="var.foo">&test.pass;</cache> +  <cache generation-variable="test.pass">&test.pass;</cache> +  </cache> +  </rxml> +  <result pass="1">111</result> +  <result pass="2">112</result> + </test> +  + <test> +  <rxml type="string"> +  <cache> +  &test.pass;    <cache propagate variable="test.pass">&test.pass;</cache>    </cache>    </rxml>    <result pass="1">11</result>    <result pass="2">22</result>   </test>      <test>    <rxml type="string">    <cache>
Roxen.git/server/etc/test/tests/rxml/RoxenTest_RXMLTags.xml:2939:    </else>    <nocache>[&var.x;]</nocache>    </cache>    <cache shared nohash key="yo4"/>    </rxml>    <result>[1][1]</result>   </test>      <test>    <rxml type="string"> +  <cache shared="" nohash="" key="yo5"> +  <nocache>[&var.xfoo;]</nocache> +  <set variable="var.xfoo" value="1"/> +  </cache> +  <unset variable="var.xfoo"/> +  +  <!-- When the test fails, the outer cache tag will incorrectly +  restore var.xfoo. -->    <cache> -  +  <cache shared="" nohash="" key="yo5"/> +  </cache> +  </rxml> +  <result>[][]</result> + </test> +  + <test> +  <rxml type="string"> +  <cache>    <define tag="foo" scope="bar">    <set variable="bar.x">17</set>    <set variable="_.y">18</set>    <charset out="iso-8859-2"/>    &_.x;&bar.y;    </define>    <foo/>    </cache>    </rxml>    <result>1718</result>
Roxen.git/server/etc/test/tests/rxml/RoxenTest_RXMLTags.xml:3859:    <rxml>    <set variable="var.contents" value="13-12-1972"/>    <nooutput>    <sscanf variables="var.d,var.m,var.y"    format="%s-%s-%s">&var.contents;</sscanf>    </nooutput>    &var.y;-&var.m;-&var.d;    </rxml>    <result>1972-12-13</result>   </test> +  +  + <!-- Run any <drop-module> statements after all tests are done. See details +  at the beginning of this file. --> +  + <drop-module>html_wash</drop-module>