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

version» Context lines:

Roxen.git/server/etc/test/tests/rxml/RoxenTest_BaseRXML.xml:1604:   </test>      <test>    <rxml>    <set variable="var.x"><![CDATA[<>%&'"]]></set>    <strlen>&var.x;</strlen>    </rxml>    <result>6</result>   </test>    + <!-- The following rather tests conversion behavior between the +  different text types. -->    -  + <test> +  <rxml type="any"> +  <set variable="var.x" type="text/*">Roxen<b>&ouml;</b></set> +  <!-- var.x contains a decoded entity from the PXml parser. --> +  <strlen>&var.x;</strlen> +  </rxml> +  <equal>13</equal> + </test> +  + <test> +  <rxml type="any"> +  <set variable="var.x" type="text/xml">Roxen<b>&ouml;</b></set> +  <!-- var.x contains an encoded entity since it's an xml value. --> +  <strlen>&var.x;</strlen> +  </rxml> +  <equal>18</equal> + </test> +  + <test> +  <rxml type="any"> +  <set variable="var.x" type="text/xml">Roxen<b>&ouml;</b></set> +  <!-- var.x contains an encoded entity since it's an xml value. +  Using the <value> tag below we also insert it with the +  text/xml type. That would break if TagStrLen had content_type +  RXML.t_text. --> +  <strlen><value type="text/xml">&var.x:none;</value></strlen> +  </rxml> +  <equal>18</equal> + </test> +  + <test> +  <rxml type="any"> +  <set variable="var.x" type="text/xml">Roxen<b>&ouml;</b></set> +  <strlen><value type="text/plain">&var.x:none;</value></strlen> +  </rxml> +  <equal>18</equal> + </test> +  +    <!-- ............................................................ -->   <comment>User Ifs</comment>   <test>   <rxml><define if=q><if variable="var.i = 4"></if></define><if q>a</if><set variable=var.i value='3'/><if q>b</if><set variable='var.i' value='4'/><if q>c</if></rxml>   <result>c</result>   </test>      <test>   <rxml><if q>X</if><else>Y</else></rxml>   <glob>[Error (parse): *]</glob>