00935a2006-10-26Martin Stjernholm <?xml version="1.0" encoding="iso-8859-1"?>
cdece02001-01-29Per Hedbor <comment>Empty tests</comment> <test> <rxml>ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890&amp;&lt;&gt;&#40;ÅäÖ</rxml> <result>ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890&amp;&lt;&gt;&#40;ÅäÖ</result> </test> <test> <rxml><br><b><i><p>x<x></p></b></i><br><br/><br /><BR></rxml> <result><br><b><i><p>x<x></p></b></i><br><br/><br /><BR></result> </test> <test> <rxml></rxml> <result></result> </test>
b9c6c62008-08-07Martin Stjernholm <test no-strip-ws="">
cdece02001-01-29Per Hedbor <rxml> x x x </rxml> <result> x x x </result> </test>
b9c6c62008-08-07Martin Stjernholm <test> <rxml> x x x </rxml> <result>x x x</result> </test>
5a1b8a2001-03-24Martin Nilsson <test> <rxml><set variable="var.x" value="Ensuring integrity between tests"/></rxml> <result></result> </test> <test> <rxml>&var.x;</rxml> <result></result> </test>
42cc342002-07-17Martin Stjernholm <!-- ............................................................ --> <comment>Basic syntax</comment> <test> <rxml>&:amp;</rxml> <result>&amp;</result> </test> <test> <rxml>&:var.foo;</rxml> <result>&var.foo;</result> </test>
5a1b8a2001-03-24Martin Nilsson <!-- ............................................................ -->
cdece02001-01-29Per Hedbor <comment>True/False/Else/Then</comment> <test> <rxml><true/><then>1</then><else>0</else></rxml> <result>1</result> </test> <test> <rxml><false/><then>1</then><else>0</else></rxml> <result>0</result> </test> <test> <rxml><true/><then>a</then>b<then>c</then><else>d</else></rxml> <result>abc</result> </test> <test> <rxml><false/><else>a</else>b<else>c</else><then>d</then></rxml> <result>abc</result> </test>
36bca62004-03-30Martin Stjernholm <test> <rxml><true/><then>a<false/></then>b<else>c</else></rxml> <result>ab</result> </test> <test> <rxml><true/><then>a<false/></then>b<then>c</then></rxml> <result>abc</result> </test> <test> <rxml><false/><else>a<true/></else>b<then>c</then></rxml> <result>abc</result> </test> <test> <rxml><false/><else>a<true/></else>b<else>c</else></rxml> <result>ab</result> </test>
cdece02001-01-29Per Hedbor <test> <rxml><set variable='var.x' value='2'/><true/><else>x<set variable='var.x' value='3'/></else>&var.x;</rxml> <result>2</result> </test> <test> <rxml><set variable='var.x' value='2'/><false/><then>x<set variable='var.x' value='3'/></then>&var.x;</rxml> <result>2</result> </test>
fe2a012009-04-24Martin Stjernholm <test> <rxml type="string"> <define tag="t"> <if variable="_.a is t"/> <then> 1t <if variable="_.b is t"/> </then> <else> 1f <if variable="_.c is t"/> </else> <then>2t</then> <else>2f</else> </define> <t a="t" b="t"/>, <t a="t" b=""/>, <!-- 1t2f would have been more logical. --> <t a="" c="t"/>, <t a="" c=""/>, </rxml> <result>1t2t,1t2t,1f2t,1f2f,</result> </test>
cdece02001-01-29Per Hedbor 
5a1b8a2001-03-24Martin Nilsson <!-- ............................................................ -->
cdece02001-01-29Per Hedbor <comment>Case</comment> <test> <rxml><case case=upper>aA</case></rxml> <result>AA</result> </test>
05f4de2001-09-27Martin Stjernholm <!-- The following is only valid in 2.1 compat mode.
cdece02001-01-29Per Hedbor <test> <rxml><case>aA</case></rxml> <result>aA</result> </test>
05f4de2001-09-27Martin Stjernholm -->
cdece02001-01-29Per Hedbor  <test> <rxml><case case=capitalize>aaAa</case></rxml> <result>AaAa</result> </test> <test> <rxml><case case=lower>aA</case></rxml> <result>aa</result> </test>
b9c6c62008-08-07Martin Stjernholm <test no-strip-ws="">
cdece02001-01-29Per Hedbor <rxml><case case="upper">a &amp; &quot; <br /></case></rxml> <result>A &amp; &#34; <br /></result> </test>
fe62b62009-04-23Martin Stjernholm <test> <rxml><case case="upper"></case></rxml> <result></result> </test>
cdece02001-01-29Per Hedbor 
5a1b8a2001-03-24Martin Nilsson <!-- ............................................................ -->
cdece02001-01-29Per Hedbor <comment>Comment</comment> <test> <rxml><set variable='var.i' value='3'/><comment preparse><set variable=var.i value='4'/>x</comment>&var.i;</rxml> <result>4</result> </test> <test> <rxml><set variable='var.i' value='3'/><comment><set variable='var.i' value='4'/>x</comment>&var.i;</rxml> <result>3</result> </test> <test> <rxml><comment>a</comment></rxml> <result></result> </test>
9057062001-01-30Martin Nilsson <test> <rxml><set variable="var.i">3</set><?comment <set variable="var.i">5</set>?>5</set>?>&var.i;</rxml> <result>3</result> </test> <test> <rxml>a<?comment <b <?comment ?> ?>c</rxml> <result>a ?> ?>c</rxml> <result>a ?>c</result> </test>
cdece02001-01-29Per Hedbor 
5a1b8a2001-03-24Martin Nilsson 
cdece02001-01-29Per Hedbor <!-- ............................................................ --> <comment>Define/undefine</comment> <test>
75c2d02009-04-23Martin Stjernholm <rxml><define if='x'>3</define><if x='3'>1</if><undefine if='x'/><if x='3'>1</if><else>0</else></rxml>
cdece02001-01-29Per Hedbor <glob>1[Error (parse): *]0</glob> </test>
b9c6c62008-08-07Martin Stjernholm 
cdece02001-01-29Per Hedbor <test no-strip-ws=""> <rxml><define tag='a'>&_.b;&a.c;</define><a c='2' b='1'/></rxml> <result>12</result> </test>
b9c6c62008-08-07Martin Stjernholm 
cdece02001-01-29Per Hedbor <test no-strip-ws=""> <rxml><define tag='q'>&_.args:none;</define><q a='b'/></rxml> <result>a="b"</result> </test>
b9c6c62008-08-07Martin Stjernholm 
cdece02001-01-29Per Hedbor <test no-strip-ws=""> <rxml><define variable='var.i'>b</define>a&var.i;<undefine variable='var.i'/>c&var.i;d</rxml> <result>abcd</result> </test>
b9c6c62008-08-07Martin Stjernholm 
cdece02001-01-29Per Hedbor <test no-strip-ws=""> <rxml><define variable="var.i" trimwhites="1"> a </define>x&var.i;</rxml> <result>xa</result> </test>
b9c6c62008-08-07Martin Stjernholm 
c7d3942001-05-22Martin Nilsson <test no-strip-ws=""> <rxml><define variable="var.i" trimwhites="1" />&var.i;</rxml> <result></result> </test>
b9c6c62008-08-07Martin Stjernholm 
cdece02001-01-29Per Hedbor <test no-strip-ws=""> <rxml><define container='x'><p ::='&_.args;'>&_.args;<contents/></p></define><x align='center'>hej</x></rxml> <result><p align="center">hej</p></result> </test>
b9c6c62008-08-07Martin Stjernholm 
cdece02001-01-29Per Hedbor <test no-strip-ws=""> <rxml><define tag='a'>A</define><a/><define tag='b'><a/>B</define><b/></rxml> <result>AAB</result> </test>
b9c6c62008-08-07Martin Stjernholm 
cdece02001-01-29Per Hedbor <test no-strip-ws=""> <rxml><define tag='q'>b</define>a<q/><undefine tag='q'/><q/></rxml> <result>ab<q/></result> </test>
b9c6c62008-08-07Martin Stjernholm 
cdece02001-01-29Per Hedbor <test no-strip-ws=""> <rxml><define tag='x'>y</define><x/><if true><x/></if></rxml> <result>yy</result> </test>
b9c6c62008-08-07Martin Stjernholm 
cdece02001-01-29Per Hedbor <test no-strip-ws=""> <rxml><define container='x'>a<contents/>c</define><x>b</x><undefine container='x'/><x>d</x></rxml> <result>abc<x>d</x></result> </test>
b9c6c62008-08-07Martin Stjernholm 
cdece02001-01-29Per Hedbor <test no-strip-ws=""> <rxml><define tag="ä">a</define><define tag="Ä">A</define>x<ä/><Ä/></rxml> <result>xaA</result> </test>
b9c6c62008-08-07Martin Stjernholm 
cdece02001-01-29Per Hedbor <test no-strip-ws=""> <rxml><define tag='x'><attrib name='y'>z</attrib>a&_.y;</define><x/>b<x y='c'/></rxml> <result>azbac</result> </test>
b9c6c62008-08-07Martin Stjernholm 
cdece02001-01-29Per Hedbor <test no-strip-ws=""> <rxml><define container='x'><attrib name='y'>z</attrib>a<contents/>&_.y;d</define><x y='c'>b</x>e<x>b</x></rxml> <result>abcdeabzd</result> </test>
b9c6c62008-08-07Martin Stjernholm 
cdece02001-01-29Per Hedbor <test no-strip-ws=""> <rxml><define container='x'>::&_.contents;::</define>a<x>b</x>c</rxml> <result>a::b::c</result> </test>
b9c6c62008-08-07Martin Stjernholm 
cdece02001-01-29Per Hedbor <test no-strip-ws=""> <rxml><define tag='x'><attrib name="y">z</attrib>&_.rest-args:none;</define><x a="b"/></rxml> <result>a="b"</result> </test>
b9c6c62008-08-07Martin Stjernholm 
cdece02001-01-29Per Hedbor <test no-strip-ws=""> <rxml><define tag="x" trimwhites="1"> <attrib name="y"> </attrib> a&_.y; </define><x/></rxml> <result>a </result> </test>
b9c6c62008-08-07Martin Stjernholm 
c7d3942001-05-22Martin Nilsson <test no-strip-ws=""> <rxml><define tag="x" trimwhites="1" /><x trimwhites="1"/></rxml> <result></result> </test>
b9c6c62008-08-07Martin Stjernholm 
cdece02001-01-29Per Hedbor <test no-strip-ws="">
1f32b52001-06-18Martin Stjernholm <rxml><define tag="x"> <attrib name="y"> </attrib> a&_.y; </define><x trimwhites="1"/></rxml> <result> a </result> </test>
b9c6c62008-08-07Martin Stjernholm 
1f32b52001-06-18Martin Stjernholm <test no-strip-ws=""> <rxml><define tag="x"><!-- foo --><attrib name="y">y</attrib><?x?><attrib name="z">z</attrib>&_.y;&_.z;</define><x/></rxml> <result><!-- foo --><?x?><attrib name="z">z</attrib>y</result> </test>
b9c6c62008-08-07Martin Stjernholm 
1f32b52001-06-18Martin Stjernholm <test no-strip-ws=""> <rxml><define tag="x"> <attrib name="y">y</attrib>x<attrib name="z">z</attrib>&_.y;&_.z;</define><x/></rxml> <result> x<attrib name="z">z</attrib>y</result> </test>
b9c6c62008-08-07Martin Stjernholm 
1f32b52001-06-18Martin Stjernholm <test no-strip-ws=""> <rxml><define tag="x"><attrib name="y">y</attrib><![CDATA[]]><attrib name="z">z</attrib>&_.y;&_.z;</define><x/></rxml> <result><![CDATA[]]><attrib name="z">z</attrib>y</result> </test>
b9c6c62008-08-07Martin Stjernholm 
1f32b52001-06-18Martin Stjernholm <test no-strip-ws=""> <rxml><define tag="x"><attrib name="y">y</attrib>&_.y;<attrib name="z">z</attrib>&_.y;&_.z;</define><x/></rxml>
cdece02001-01-29Per Hedbor <result>y<attrib name="z">z</attrib>y</result> </test>
b9c6c62008-08-07Martin Stjernholm 
cdece02001-01-29Per Hedbor <test no-strip-ws=""> <rxml><define container="x"> a&_.contents; </define><x trimwhites="1">b </x></rxml> <result> ab </result> </test>
b9c6c62008-08-07Martin Stjernholm 
cdece02001-01-29Per Hedbor <test no-strip-ws=""> <rxml><define tag="x">&_.y;&x.y;</define><x y="z"/></rxml> <result>zz</result> </test>
b9c6c62008-08-07Martin Stjernholm 
cdece02001-01-29Per Hedbor <test no-strip-ws=""> <rxml><define tag="x" scope="p">&_.y;&p.y;</define><x y="z"/></rxml> <result>zz</result> </test>
b9c6c62008-08-07Martin Stjernholm 
cdece02001-01-29Per Hedbor <test no-strip-ws=""> <rxml><define tag="x">&var.x;</define><set variable="var.x">y</set><x/></rxml> <result>y</result> </test>
b9c6c62008-08-07Martin Stjernholm 
cdece02001-01-29Per Hedbor <test no-strip-ws=""> <rxml><define tag="x" preparse="1">&var.x;</define><set variable="var.x">y</set><x/></rxml> <result></result> </test>
b9c6c62008-08-07Martin Stjernholm 
1f32b52001-06-18Martin Stjernholm <test no-strip-ws=""> <rxml><define tag="x"><attrib name="y">1</attrib> <![CDATA[</attrib>]]> <attrib name="z">2</attrib> &_.y;:&_.z;</define><x/></rxml>
c7d3942001-05-22Martin Nilsson <result> <![CDATA[</attrib>]]> <attrib name="z">2</attrib> 1:</result> </test>
b9c6c62008-08-07Martin Stjernholm 
c7d3942001-05-22Martin Nilsson <test no-strip-ws=""> <rxml><define tag="x"><attrib name="y">hej</attrib><maketag type="tag" name="&_.y;">&_.y; <attrib name="foo">bar</attrib></maketag></define><x/></rxml> <result><hej foo="bar" /></result> </test>
1f32b52001-06-18Martin Stjernholm  <test> <rxml type="string"> <emit source="values" values="1,2" split=","> <if variable="_.value = 1"> <define tag="t">a</define> </if> <else> <define tag="t">b</define> </else> <t/> </emit> </rxml> <result>ab</result> </test>
e19e5b2001-07-10Martin Stjernholm  <test> <rxml type="string"> <define container="foo" scope="s"> &s.value; <contents/> &s.value; </define> <emit source="values" values="x" scope="s"> &s.value; <foo value="y">&s.value;</foo> &s.value; </emit> </rxml> <result>xyxyx</result> </test> <test> <rxml type="string"> <define container="foo"> &_.value; <emit source="values" values="z"> &_.value; <contents/> &_.value; </emit> &_.value; </define> <emit source="values" values="x"> &_.value; <foo value="y">&_.value;</foo> &_.value; </emit> </rxml> <result>xyzxzyx</result> </test> <test> <rxml type="string"> <define container="foo" scope="s"> &s.value; <emit source="values" values="z" scope="s"> &s.value; <contents/> &s.value; </emit> &s.value; </define> <emit source="values" values="x" scope="s"> &s.value; <foo value="y">&s.value;</foo> &s.value; </emit> </rxml> <result>xyzxzyx</result> </test>
e0952f2002-02-04Martin Stjernholm  <test> <rxml type="string"> <define container="foo" preparse="y"> <trimlines> &_.contents; &_.argument; </trimlines> </define> <foo argument="x">y</foo> </rxml> <result>yx</result> </test> <test> <rxml type="string"> <define container="foo" preparse="y" scope="s"> <trimlines> &_.contents; &_.argument; &s.contents; &s.argument; </trimlines> </define> <foo argument="x">y</foo> </rxml> <result>yxyx</result> </test>
1c15392002-02-05Martin Stjernholm  <test> <rxml ><define tag=post>post</define ><define tag=pre>pre<noparse><post/><date/></noparse></define ><define container=foo preparse=""><pre/>&_.contents;<contents/>&_.arg;</define ><foo arg="a">c</foo ></rxml> <result>pre<post/><date/>cca</result> </test>
25ef572002-07-17Martin Stjernholm  <test> <rxml ><set variable="var.foo">&:var.bar;</set ><define tag=foo preparse="">&var.foo:none;</define ><foo /></rxml> <result>&var.bar;</result> </test>
7498292002-02-15Martin Stjernholm  <test> <rxml ><define container="x" ><contents copy-of="a/node()"/> <contents copy-of="processing-instruction()"/> <contents copy-of="processing-instruction(y)"/> <contents copy-of="processing-instruction()[-1]"/> <contents copy-of="comment()[1]"/> <contents value-of="processing-instruction(x)"/> <contents value-of="comment()"/> <contents copy-of="text()"/> </define ><x>a&auml; &amp; b <?x &amp; y?><!--c--> <?y?><a x='&amp;'>&amp;&lt;foo<a x='1' g="'">y</a></a ><b y='&lt;' p='q' />&lt;&gt;<a x='2' y='p'><a x='3'/><a x='4'/></a ><!--d--></x ></rxml> <result>&lt;foo<a x='1' g="'">y</a><a x='3'/><a x='4'/> <?x &amp; y?><?y?> <?y?> <?y?> <!--c--> &amp;amp; y c a&auml; &amp; b &gt; </result> </test>
9eb5c82002-03-27Martin Stjernholm  <test> <rxml ><define container="x"><contents copy-of="*[-1]"/><contents/></define ><x><a>A</a><b>B</b></x ></rxml> <result><b>B</b><a>A</a><b>B</b></result> </test>
239b2a2002-02-14Martin Stjernholm  <test> <rxml type="string"> <define container="x"> <contents copy-of="*[-1]"/> &var.foo; <contents copy-of="*[1]"/> &var.foo; </define> <x> <set variable="var.foo" value="first"/> <set variable="var.foo" value="second"/> </x>
9eb5c82002-03-27Martin Stjernholm  </rxml> <result>secondsecond</result> </test> <test> <rxml ><define container="x" ><contents copy-of="*[-1]"/>&var.foo;<contents copy-of="*[1]"/>&var.foo;</define ><x><set variable="var.foo" value="&var.foo;x"/>&var.foo;<first-tag/><last-tag/></x ></rxml> <result><last-tag/>x<first-tag/>x</result> </test> <test> <rxml ><define container="x" ><contents copy-of="*[-1]"/>&var.foo;<contents eval copy-of="*[1]"/>&var.foo;</define ><x><set variable="var.foo" value="&var.foo;x"/>&var.foo;<first-tag/><last-tag/></x ></rxml> <result><last-tag/>x<first-tag/>xx</result> </test> <test> <rxml ><define container="x" >&_.contents;&var.foo;</define ><set variable="var.foo" value="x" /><x><set variable="var.foo" value="&var.foo;x"/>&var.foo;</x ></rxml>
239b2a2002-02-14Martin Stjernholm  <result>&lt;set variable=&#34;var.foo&#34; value=&#34;&amp;var.foo;x&#34;/&gt;x</result> </test>
b9c6c62008-08-07Martin Stjernholm 
239b2a2002-02-14Martin Stjernholm <test no-strip-ws=""> <rxml type="string"> <define container="x"> <contents copy-of="*/@*"/> </define> <set variable="var.foo">up</set> <set variable="var.bar">down</set> <x> <y a="&var.foo;"/>&var.foo; <y b="&var.bar;"/>&var.bar; </x>
9eb5c82002-03-27Martin Stjernholm  </rxml>
239b2a2002-02-14Martin Stjernholm  <result> a="up" b="down"</result> </test>
b9c6c62008-08-07Martin Stjernholm 
239b2a2002-02-14Martin Stjernholm <test no-strip-ws=""> <rxml type="string"> <define container="x"> <contents copy-of="*[-1]/@*"/> </define> <set variable="var.foo">up</set> <set variable="var.bar">down</set> <x> <y a="&var.foo;"/>&var.foo; <y b="&var.bar;"/>&var.bar; </x>
9eb5c82002-03-27Martin Stjernholm  </rxml>
239b2a2002-02-14Martin Stjernholm  <result> b="down"</result> </test> <test> <rxml type="string"> <define container="x"> <contents copy-of="y/@b"/> </define> <set variable="var.foo">up</set> <set variable="var.bar">down</set> <x> <z a="&var.foo;"/>&var.foo; <y b="&var.bar;"/>&var.bar; </x>
b9c6c62008-08-07Martin Stjernholm  </rxml>
239b2a2002-02-14Martin Stjernholm  <result>b="down"</result> </test> <test> <rxml type="string"> <define container="x"> <contents value-of="*[-1]"/> </define> <emit source="values" values="x"> <x>
9eb5c82002-03-27Martin Stjernholm  <set variable="var.foo">first</set> <set variable="var.foo" type="text/xml"> start <!-- the start --> <p><emit source="values" values="1,2" split=",">[&_.value;]</emit></p> stop<?foo bar?> </set>
239b2a2002-02-14Martin Stjernholm  &var.foo:none; </x> </emit>
9eb5c82002-03-27Martin Stjernholm  </rxml>
239b2a2002-02-14Martin Stjernholm  <result>[1][2]</result> </test> <test> <rxml type="string"> <define container="x"> <contents value-of="*/@*"/> </define> <set variable="var.foo">up</set> <set variable="var.bar">down</set> <x> <y a="&var.foo;"/>&var.foo; <y b="&var.bar;"/>&var.bar; </x> </rxml> <result>up</result> </test> <test> <rxml type="string"> <define container="x"> <contents copy-of="*[-1]/@*"/> </define> <set variable="var.foo">up</set> <set variable="var.bar">down</set> <x> <y a="&var.foo;"/>&var.foo; <y b="&var.bar;"/>&var.bar; </x>
b9c6c62008-08-07Martin Stjernholm  </rxml>
239b2a2002-02-14Martin Stjernholm  <result>b="down"</result> </test> <test> <rxml type="string"> <define container="x"> <contents copy-of="y/@b"/> </define> <set variable="var.foo">up</set> <set variable="var.bar">down</set> <x> <z a="&var.foo;"/>&var.foo; <y b="&var.bar;"/>&var.bar; </x>
b9c6c62008-08-07Martin Stjernholm  </rxml>
239b2a2002-02-14Martin Stjernholm  <result>b="down"</result> </test> <test> <rxml type="string"> <define container="x"> <contents copy-of="@b"/> </define> <x a="1" b="2"> <y b="3" c="4"/> </x>
b9c6c62008-08-07Martin Stjernholm  </rxml>
239b2a2002-02-14Martin Stjernholm  <result>b="2"</result> </test> <test> <rxml type="string">
9eb5c82002-03-27Martin Stjernholm  <define container="x" preparse="">
239b2a2002-02-14Martin Stjernholm  [<contents copy-of="*/text()"/>] </define>
9eb5c82002-03-27Martin Stjernholm  <x> <a><set variable="var.foo" value="x"/></a>
239b2a2002-02-14Martin Stjernholm  &var.foo;|<b><insert variable="var.foo"/></b> </x> </rxml> <result>[x]</result> </test> <test> <rxml ><define tag="y" preparse="" ><maketag type="tag" name="made" ><attrib name="attr"><contents value-of="@a"/></attrib ></maketag ></define ><y a="1" b="2" /></rxml> <result><made attr="1" /></result> </test>
4ac91e2004-12-01Martin Stjernholm  <test> <rxml ><define container="x"><contents copy-of="*[@foo]"/></define ><x><a foo="bar"/><b bar="foo"/><c foo="gnu"/><d foo="bar"/></x ></rxml> <result><a foo="bar"/><c foo="gnu"/><d foo="bar"/></result> </test> <test> <rxml ><define container="x"><contents copy-of="b[@foo]"/></define ><x><a foo="bar"/><b bar="foo"/><c foo="gnu"/><d foo="bar"/></x ></rxml> <result></result> </test> <test> <rxml ><define container="x"><contents copy-of="*[@foo='bar']"/></define ><x><a foo="bar"/><b bar="foo"/><c foo="gnu"/><d foo="bar"/></x ></rxml> <result><a foo="bar"/><d foo="bar"/></result> </test> <test> <rxml ><define container="x"><contents copy-of="* [ @ foo = &quot;bar&quot; ]"/>&quot;&quot;</define ><x><a foo="bar"/><b bar="foo"/><c foo="gnu"/><d foo="bar"/></x ></rxml> <result><a foo="bar"/><d foo="bar"/></result> </test> <test> <rxml ><define container="x"><contents copy-of="* [ @ foo = &quot;bar &quot; ]"/>&quot;&quot;</define ><x><a foo="bar"/><b bar="foo"/><c foo="gnu"/><d foo="bar"/></x ></rxml> <result></result> </test> <test> <rxml ><define container="x"><contents copy-of="*/@foo[@foo]"/></define ><x><a foo="bar"/><b bar="foo"/><c foo="gnu"/><d foo="bar"/></x
b9c6c62008-08-07Martin Stjernholm  ></rxml>
4ac91e2004-12-01Martin Stjernholm  <result>foo="bar" foo="gnu" foo="bar"</result> </test> <test> <rxml ><define container="x"><contents copy-of="*/@foo[@foo='bar']"/></define ><x><a foo="bar"/><b bar="foo"/><c foo="gnu"/><d foo="bar"/></x
b9c6c62008-08-07Martin Stjernholm  ></rxml>
4ac91e2004-12-01Martin Stjernholm  <result>foo="bar" foo="bar"</result> </test> <test> <rxml ><define container="x"><contents copy-of="a[@foo]/y"/></define ><x><a foo="bar"><y id="1"/></a><a><y id="2"/></a><a foo="gnu"><y id="3"/></a></x ></rxml> <result><y id="1"/><y id="3"/></result> </test>
239b2a2002-02-14Martin Stjernholm  <test> <rxml><define variable="var.i" preparse=""><contents/></define></rxml> <glob>[Error (parse): *]</glob> </test> <test> <rxml ><define tag="x" ><define variable="var.i" preparse=""><contents/></define ></define ><x /></rxml> <glob>[Error (parse): *]</glob> </test> <test> <rxml type="string"> <define container="x" scope="x"> <define variable="var.i" preparse=""><contents scope="x"/></define> &var.i; </define> <x>wox</x> &var.i; </rxml> <result>woxwox</result> </test> <test> <rxml type="string"> <emit source="values" values="y"> <define variable="var.i" preparse="">&_.value;</define> &var.i; </emit> </rxml> <result></result> </test>
9eb5c82002-03-27Martin Stjernholm  <test> <rxml type="string"> <define container="x"> <set variable="var.y" expr="&var.init; + 1"/>&var.init; <contents/> <set variable="var.y" expr="&var.init; + 2"/>&var.init; <contents eval/> </define> <set variable="var.init" value="4"/> <x>a&var.y;</x>| <x>b&var.y;</x>| <set variable="var.init" value="8"/> <x>a&var.y;</x>| <x>b&var.y;</x>| </rxml> <result>a5a6|b5b6|a9a10|b9b10|</result> </test> <test> <rxml type="string"> <define container="x"> <set variable="var.y" expr="&var.init; + 1"/>&var.init; <contents value-of="text()[-1]"/> <set variable="var.y" expr="&var.init; + 2"/>&var.init; <contents eval value-of="text()[-1]"/> </define> <set variable="var.init" value="4"/> <x><set variable="var.y" value="-&var.y;"/>&var.y;ignored<!-- -->&var.y;</x>| <x>ignored<!-- -->&var.y;</x>| <set variable="var.init" value="8"/> <x><set variable="var.y" value="-&var.y;"/>&var.y;ignored<!-- -->&var.y;</x>| <x>ignored<!-- -->&var.y;</x>| </rxml> <result>-5-6|56|-9-10|910|</result> </test> <test> <rxml type="string"> <define container="x" scope="x" preparse> <define tag="y-text">y</define> <define container="y" preparse> [<y-text/>:<contents/>][x:<contents scope="x"/>] </define> <define tag="y-text">z</define> <y>y-exp</y> </define> <x>x-exp</x> </rxml> <result>[y:y-exp][x:x-exp]</result> </test> <test> <rxml type="string"> <define container="x" preparse> <attrib name="foo">z</attrib> <contents value-of="*[1]"/> &_.foo; <contents value-of="@foo"/> </define> <x><y>y</y></x> </rxml> <result>yzz</result> </test>
08b6752004-12-01Martin Stjernholm  <test> <rxml type="string"> <define container="x"> <set variable="_.data"><contents value-of="item" result-set=""/></set> <emit source="values" variable="_.data" sort="value"> &_.value;<delimiter>|</delimiter> </emit> </define> <x> <item>måndag</item> <item>tisdag</item> <item>onsdag</item> <item>torsdag</item> <item>fredag</item> <item>lördag</item> <item>söndag</item> </x> </rxml> <result>fredag|lördag|måndag|onsdag|söndag|tisdag|torsdag</result> </test>
e835c32008-10-09Martin Stjernholm  <test> <rxml type="string"> <define container="x"> <contents value-of="elem/@attr" result-set=""/> </define> <set variable="var.a"> <x><elem attr="1" foo=""/><elem attr="2" bar=""/></x> </set> &var.a.1;|&var.a.2; </rxml> <result>1|2</result> </test> <test> <rxml type="string"> <define container="x"> <contents value-of="elem/@*" result-set=""/> </define> <set variable="var.a"> <x><elem attr="1" foo="f"/><elem attr="2" bar="b"/></x> </set> <emit source="values" variable="var.a" sort="value"> &_.value;| </emit> </rxml> <result>1|2|b|f|</result> </test>
08b6752004-12-01Martin Stjernholm  <test> <rxml type="string"> <define container="x"> <set variable="_.data"><contents copy-of="item[@ok]" result-set=""/></set> <emit source="values" variable="_.data" sort="value">&_.value:none;</emit> </define> <x> slask <item ok="ja"><veckostart>måndag</veckostart></item> <item>tisdag</item> <item ok="">onsdag</item> <?item mupp ?> <item>torsdag</item> <item ok="">fredag</item> <item ok="">lördag</item> <item>söndag</item> </x> </rxml> <result><item ok="">fredag</item><item ok="">lördag</item><item ok="">onsdag</item><item ok="ja"><veckostart>måndag</veckostart></item></result> </test> <test> <rxml type="string"> <define container="x"> <set variable="_.data"><contents copy-of="item" result-set=""/></set> &_.data.-1:none; &_.data.1:none; </define> <x> en <item>två</item> <?item tre ?> <item>fyra</item> </x> </rxml> <result><item>fyra</item><item>två</item></result> </test>
14ef412006-10-26Martin Stjernholm  <test> <rxml ><define container="fl"><contents copy-of="text()"/></define ><fl><![CDATA[xyz]]></fl ></rxml> <result><![CDATA[xyz]]></result> </test> <test> <rxml ><define container='datest' ><contents copy-of=".//pcheck" /></define ><datest ><pcheck>chk1</pcheck ><pcheck>chk2</pcheck ><p><pcheck>chk3</pcheck></p ><pcheck>chk4</pcheck ></datest ></rxml> <result><pcheck>chk1</pcheck><pcheck>chk2</pcheck><pcheck>chk3</pcheck><pcheck>chk4</pcheck></result> </test> <test> <rxml ><define container='snyggtorkel' ><contents copy-of=".//comment()" /></define ><snyggtorkel
00935a2006-10-26Martin Stjernholm  ><!-- etta --><pcheck
14ef412006-10-26Martin Stjernholm  ><!-- tvåa --><p/><!-- trea --></pcheck ><!-- fyra --><p /></snyggtorkel
00935a2006-10-26Martin Stjernholm  ></rxml>
14ef412006-10-26Martin Stjernholm  <result><!-- etta --><!-- tvåa --><!-- trea --><!-- fyra --></result> </test> <test> <rxml ><define container='nisse' ><contents copy-of=".//." /></define ><nisse ><e id="1" >1<e id="1.1" />2</e >3<e id="2" /></nisse ></rxml> <result><e id='1'>1<e id='1.1'/>2</e>1<e id='1.1'/>23<e id='2'/></result> </test> <test> <rxml ><define container='nisse' ><contents copy-of=".//node()" /></define ><nisse ><e id="1" >1<e id="1.1" />2</e >3<e id="2" /></nisse ></rxml> <result><e id='1'>1<e id='1.1'/>2</e>1<e id='1.1'/>23<e id='2'/></result> </test> <test> <rxml ><define container='nisse' ><contents copy-of=".//*" /></define ><nisse ><e id="1" >1<e id="1.1" />2</e >3<e id="2" /></nisse ></rxml> <result><e id='1'>1<e id='1.1'/>2</e><e id='1.1'/><e id='2'/></result> </test> <test> <rxml ><define container='nisse' ><contents copy-of=".//e//e" /></define ><nisse ><e id="1" ><e id="1.1" ><e id="1.1.1" ><e id="1.1.1.1" /></e ></e ></e ></nisse ></rxml> <result><e id="1.1"><e id="1.1.1"><e id="1.1.1.1"/></e></e><e id="1.1.1"><e id="1.1.1.1"/></e><e id="1.1.1.1"/></result> </test> <test> <rxml ><define container='nisse' ><contents copy-of=".//a/b//c" /></define ><nisse ><a><x><c/></x></a ><a><x><b><y><c/></y></b></x></a ><x><a><y><a><b><z><c hit="yes"/></z></b></a></y></a></x ></nisse ></rxml> <result><c hit="yes"/></result> </test>
c91fb72008-11-18Martin Stjernholm  <test> <rxml type="array"> <define container="elements"> <value type="array"> <value type="string">b <inc variable="var.x"/>&var.x;</value> <contents/> <value type="string">e <inc variable="var.x"/>&var.x;</value> </value> </define> <value><inc variable="var.x"/>&var.x;</value> <elements> <value><inc variable="var.x"/>&var.x;</value> <value><inc variable="var.x"/>&var.x;</value> </elements> <value><inc variable="var.x"/>&var.x;</value> </rxml> <equal>({1, ({"b2", 3, 4, "e5"}), 6})</equal> </test> <test> <rxml type="mapping"> <define container="elements"> <value index="B"><inc variable="var.x"/>&var.x;</value> <contents/> <value index="E"><inc variable="var.x"/>&var.x;</value> </define> <value index="a"><inc variable="var.x"/>&var.x;</value> <elements> <value index="b"><inc variable="var.x"/>&var.x;</value> <value index="c"><inc variable="var.x"/>&var.x;</value> </elements> <value index="d"><inc variable="var.x"/>&var.x;</value> </rxml> <equal>(["a": 1, "B": 2, "b": 3, "c": 4, "E": 5, "d": 6])</equal> </test>
88437c2009-04-24Martin Stjernholm  <test no-strip-ws=""> <rxml> <define container="x"> <!-- comment --> <maketag type="container" name="y"> <contents/> </maketag> </define> <z> <x> <!-- comment 1 --> foo </x> </z> <z> <x> <!-- comment 2 --> bar </x> </z> [<value type="string"> &lt;z> <x> <!-- comment 3 --> upp </x> &lt;/z> </value>] [<value type="string"> &lt;z> <x> <!-- comment 4 --> ner </x> &lt;/z> </value>] </rxml> <equal> "\n" " \n" "\n" " <z>\n" " \n" " <!-- comment -->\n" " <y>\n" " \n" " <!-- comment 1 -->\n" " foo\n" " \n" " </y>\n" " \n" " </z>\n" "\n" " <z>\n" " \n" " <!-- comment -->\n" " <y>\n" " \n" " <!-- comment 2 -->\n" " bar\n" " \n" " </y>\n" " \n" " </z>\n" "\n" " [<z><y>upp</y></z>]\n" "\n" " [<z><y>ner</y></z>]\n" " " </equal> </test>
ecfad82010-04-27Martin Stjernholm  <test> <rxml type="string"> <define container="tag"> <if variable="_.contents">"&_.contents;"</if> </define> [<tag/>, <tag></tag>, <tag> </tag>] </rxml> <!-- Note: This produced [,," "] in 4.5 and 5.0 release 1 and 2. --> <result>["",""," "]</result> </test> <test> <rxml type="string"> <define container="tag"> <if sizeof="_.contents &gt; 0">&gt;"&_.contents;"</if> </define> [<tag/>, <tag></tag>, <tag> </tag>] </rxml> <result>[,," "]</result> </test>
cc13152010-06-30Martin Stjernholm  <test> <rxml type="any"> <define container="test"> <contents value-of="a/b[c/@type = '2']/d" result-set=""/> </define> <test> <a> <b> <c type="1"/> <d>x</d> </b> <b> <c type="2"/> <d>y</d> </b> </a> </test> </rxml> <equal>({"y"})</equal> </test> <test> <rxml type="any"> <define container="test"> <contents value-of="a/b[c/@* = '2']/d" result-set=""/> </define> <test> <a> <b> <c type="1" foo="17"/> <d>x</d> </b> <b> <c type="2" foo="17"/> <d>y</d> </b> </a> </test> </rxml> <equal>({"y"})</equal> </test> <test> <rxml type="any"> <define container="test"> <contents value-of="a/b[c/@* = '2']/d" result-set=""/> </define> <test> <a> <b> <c type="1" foo="2"/> <d>x</d> </b> <b> <c type="2" foo="17"/> <d>y</d> </b> </a> </test> </rxml> <equal>({"x", "y"})</equal> </test>
1528842010-06-30Martin Stjernholm  <test> <rxml type="any"> <define container="test"> <contents value-of="a/b[c[1]/@* = '2']/d" result-set=""/> </define> <test> <a> <b> <c type="1" foo="2"/> <d>x</d> </b> <b> <c type="2" foo="17"/> <d>y</d> </b> </a> </test> </rxml> <equal>({"x", "y"})</equal> </test> <test> <rxml type="any"> <define container="test"> <contents value-of="a/b[c = '2']/d" result-set=""/> </define> <test> <a> <b> <c type="1" foo="2">1</c> <d>x</d> </b> <b> <c type="2" foo="17">2</c> <d>y</d> </b> </a> </test> </rxml> <equal>({"y"})</equal> </test>
1f32b52001-06-18Martin Stjernholm  <!-- ............................................................ --> <comment>Type tests</comment> <test> <rxml type="any"><case case="upper"> a </case></rxml> <result>A</result> </test> <test> <rxml type="scalar"><case case="upper"> a </case></rxml> <result>A</result> </test> <test> <rxml type="string">|<case case="upper"> a </case>|</rxml> <result>|A|</result> </test> <test> <rxml type="text/*">|<case case="upper"> a </case>|</rxml> <result>| A |</result> </test> <test> <rxml type="text/html">|<case case="upper"> a </case>|</rxml> <result>| A |</result> </test>
feb0832002-10-15Martin Stjernholm 
acd48b2006-01-10Martin Stjernholm <test> <rxml type="text/html"><emit source="TESTER" test="5">&_.v;&_.v;&_.v:html;&_.v:none;</emit></rxml>
feb0832002-10-15Martin Stjernholm  <result>&lt;&amp;&gt;&lt;&amp;&gt;&lt;&amp;&gt;<&></result> </test>
acd48b2006-01-10Martin Stjernholm <test> <rxml type="text/html"><emit source="TESTER" test="5">&_.c;&_.c;&_.c:html;&_.v:none;</emit></rxml>
feb0832002-10-15Martin Stjernholm  <result>&lt;&amp;&gt;&lt;&amp;&gt;&lt;&amp;&gt;<&></result> </test>
acd48b2006-01-10Martin Stjernholm <test> <rxml type="text/plain"><emit source="TESTER" test="5">&_.v;&_.v;&_.v:html;&_.v:none;</emit></rxml>
feb0832002-10-15Martin Stjernholm  <result><&><&>&lt;&amp;&gt;<&></result> </test>
acd48b2006-01-10Martin Stjernholm <test> <rxml type="text/plain"><emit source="TESTER" test="5">&_.c;&_.c;&_.c:html;&_.v:none;</emit></rxml>
feb0832002-10-15Martin Stjernholm  <result><&><&>&lt;&amp;&gt;<&></result> </test> <!-- client.tm is used below because it's a constant variable that contains "<" and ">" in the output and that can't be constant due to the nonstandard type conversion. --> <test> <rxml type="text/html">&client.tm;&client.tm;</rxml> <result>&lt;TM&gt;&lt;TM&gt;</result> </test> <test> <rxml type="text/plain">&client.tm;&client.tm;</rxml> <result><TM><TM></result> </test>
5996c42009-09-02Martin Stjernholm  <test> <rxml type="any"> <set variable="var.a" type="string">17</set> <set variable="var.b" type="int">&var.a:sql;</set> &var.b; </rxml> <equal>17</equal> </test> <test> <rxml type="any"> <set variable="var.a" type="string">17</set> <set variable="var.b" type="int">&var.a;</set> &var.b; </rxml> <equal>17</equal> </test>
69c10f2012-05-11Martin Stjernholm  <test> <rxml type="array"> <set variable="var.foo" type="mapping"/> <set variable="var.foo.a" value="1"/> <set variable="var.bar" type="mapping"/> <set variable="var.bar.c" value="3"/> &var.foo; &var.bar; <value type="mapping"/> </rxml> <equal>({(["a": "1"]), (["c": "3"]), ([])})</equal> </test>
cdece02001-01-29Per Hedbor 
5a1b8a2001-03-24Martin Nilsson 
cdece02001-01-29Per Hedbor <!-- ............................................................ --> <comment>String number test</comment>
efa4402001-05-17Martin Nilsson <test>
cdece02001-01-29Per Hedbor <rxml><number lang=swe num=43 /></rxml> <result>fyrtiotre</result> </test>
efa4402001-05-17Martin Nilsson <test>
cdece02001-01-29Per Hedbor <rxml><number lang=sv num=43 /></rxml> <result>fyrtiotre</result> </test>
efa4402001-05-17Martin Nilsson <test>
cdece02001-01-29Per Hedbor <rxml><number num=42 /></rxml> <result>fortytwo</result> </test>
efa4402001-05-17Martin Nilsson  <test> <rxml><number num=11 type=roman /></rxml> <result>XI</result> </test> <test>
90f6fa2009-12-04Jonas Wallden <rxml><number num=61254312 type=memory /></rxml>
efa4402001-05-17Martin Nilsson <result>58.4 MB</result> </test>
cdece02001-01-29Per Hedbor 
5a1b8a2001-03-24Martin Nilsson 
cdece02001-01-29Per Hedbor <!-- ............................................................ --> <comment>IfIs operands</comment> <test> <rxml><set variable='var.i' value='10' /><set variable='var.j' value='0'/><set variable="var.x" value=""/><if sizeof="var.x is 0">5</if></rxml> <result>5</result> </test> <test> <rxml><set variable='var.i' value='10' /><set variable='var.j' value='0'/><if variable="var.i is 8,9,10,11">1</if></rxml> <result>1</result> </test> <test> <rxml><set variable='var.i' value='10' /><set variable='var.j' value='0'/><if variable="var.i != 11">1</if></rxml> <result>1</result> </test> <test> <rxml><set variable='var.i' value='10' /><set variable='var.j' value='0'/><if variable="var.foo">1</if></rxml> <result></result> </test> <test> <rxml><set variable='var.i' value='10' /><set variable='var.j' value='0'/><set variable="var.x" value="-5"/><if variable="var.x < 3">1</if></rxml> <result>1</result> </test> <test> <rxml><set variable='var.i' value='10' /><set variable='var.j' value='0'/><if variable="var.i < 11">1</if><else>0</else></rxml> <result>1</result> </test> <test> <rxml><set variable='var.i' value='10' /><set variable='var.j' value='0'/><if variable="var.i == 10">1</if></rxml> <result>1</result> </test> <test> <rxml><set variable='var.i' value='10' /><set variable='var.j' value='0'/><if variable="var.j < 0">1</if><else>0</else></rxml> <result>0</result> </test> <test> <rxml><set variable='var.i' value='10' /><set variable='var.j' value='0'/><if variable="var.i is 11">1</if><else>0</else></rxml> <result>0</result> </test> <test> <rxml><set variable='var.i' value='10' /><set variable='var.j' value='0'/><if variable="var.i == ?1,?0">8</if></rxml> <result>8</result> </test> <test> <rxml><set variable='var.i' value='10' /><set variable='var.j' value='0'/><if variable="var.i is ?">6</if></rxml> <result></result> </test> <test> <rxml><set variable='var.i' value='10' /><set variable='var.j' value='0'/><if variable="var.i is *">5</if></rxml> <result>5</result> </test> <test> <rxml><set variable='var.i' value='10' /><set variable='var.j' value='0'/><set variable="var.x" value="-30"/><if variable="var.x < -2">1</if></rxml> <result>1</result> </test> <test> <rxml><set variable='var.i' value='10' /><set variable='var.j' value='0'/><if variable="var.i < 10">1</if><else>0</else></rxml> <result>0</result> </test> <test> <rxml><set variable='var.i' value='10' /><set variable='var.j' value='0'/><if variable="var.i = 10">1</if></rxml> <result>1</result> </test> <test> <rxml><set variable='var.i' value='10' /><set variable='var.j' value='0'/><if variable="var.i is 10">1</if></rxml> <result>1</result> </test> <test> <rxml><set variable='var.i' value='10' /><set variable='var.j' value='0'/><if variable="var.i is ??">7</if></rxml> <result>7</result> </test> <test> <rxml><set variable='var.i' value='10' /><set variable='var.j' value='0'/><if variable="var.i > 9">1</if><else>0</else></rxml> <result>1</result> </test> <test> <rxml><set variable='var.i' value='10' /><set variable='var.j' value='0'/><if variable="var.i is *10*">3</if></rxml> <result>3</result> </test> <test> <rxml><set variable='var.i' value='10' /><set variable='var.j' value='0'/><if variable="var.j > 0">1</if><else>0</else></rxml> <result>0</result> </test> <test> <rxml><set variable='var.i' value='10' /><set variable='var.j' value='0'/><if variable="var.i is *11*">4</if></rxml> <result></result> </test> <test> <rxml><set variable='var.i' value='10' /><set variable='var.j' value='0'/><if variable="var.j > -1">1</if><else>0</else></rxml> <result>1</result> </test> <test> <rxml><set variable='var.i' value='10' /><set variable='var.j' value='0'/><if variable="var.j != 0">1</if><else>0</else></rxml> <result>0</result> </test> <test> <rxml><set variable='var.i' value='10' /><set variable='var.j' value='0'/><if variable="var.j is 0">1</if></rxml> <result>1</result> </test> <test> <rxml><set variable='var.i' value='10' /><set variable='var.j' value='0'/><if sizeof="var.i == 2">3</if></rxml> <result>3</result> </test> <test> <rxml><set variable='var.i' value='10' /><set variable='var.j' value='0'/><if variable="var.i > 10">1</if><else>0</else></rxml> <result>0</result> </test> <test> <rxml><set variable='var.i' value='10' /><set variable='var.j' value='0'/><if variable="var.i is 8,9,11">2</if></rxml> <result></result> </test> <test> <rxml><set variable='var.i' value='10' /><set variable='var.j' value='0'/><if variable="var.j < 1">1</if><else>0</else></rxml> <result>1</result> </test> <test> <rxml><set variable='var.i' value='10' /><set variable='var.j' value='0'/><if variable="var.i != 10">1</if><else>0</else></rxml> <result>0</result> </test> <test> <rxml><set variable='var.i' value='10' /><set variable='var.j' value='0'/><if variable="var.j != 1">1</if></rxml> <result>1</result> </test> <test> <rxml><set variable='var.i' value='10' /><set variable='var.j' value='0'/><if sizeof="var.i != 2">4</if></rxml> <result></result> </test> <test> <rxml><set variable='var.i' value='10' /><set variable='var.j' value='0'/><if variable="var.i">2</if></rxml> <result>2</result> </test> <test> <rxml><set variable='var.i' value='10' /><set variable='var.j' value='0'/><set variable="var.x" value="-0.2"/><if variable="var.x > -0.3">1</if><else>0</else></rxml> <result>1</result> </test>
f1200c2005-08-30Martin Stjernholm  <test> <rxml type="string"> <set variable="var.n" value="4314351451313243221222"/> <if variable="var.n > 4314351451313243221221">1</if> <if variable="var.n &lt; 4314351451313243221223">&lt;1</if> </rxml> <result>11</result> </test>
505e4c2001-06-11Martin Stjernholm  <test> <rxml><emit source="values" values="1,2,3" split=","><if variable="_.value = 1">&_.value;</if></emit></rxml> <result>1</result> </test>
5f9df52002-06-17Martin Stjernholm 
d0a2a92002-06-24Martin Stjernholm <test> <rxml type="string">
1987692002-06-27Martin Stjernholm  <if variable="var.foo">1</if><else>0</else> <if variable="var.foo is ">1<!-- Bogus 2.2 behavior. --></if><else>0</else>
d0a2a92002-06-24Martin Stjernholm  <if variable="var.foo != ">1</if><else>0</else> <if variable="var.foo is 0">1</if><else>0</else> <if variable="var.foo = ?*">1</if><else>0</else>
1987692002-06-27Martin Stjernholm  </rxml>
d0a2a92002-06-24Martin Stjernholm  <result>00100</result> </test> <test> <rxml type="string"> <set variable="var.foo" value=""/> <if variable="var.foo">1</if><else>0</else>
1987692002-06-27Martin Stjernholm  <if variable="var.foo is ">1</if><else>0</else>
d0a2a92002-06-24Martin Stjernholm  <if variable="var.foo != ">1</if><else>0</else> <if variable="var.foo is 0">1</if><else>0</else> <if variable="var.foo = ?*">1</if><else>0</else>
1987692002-06-27Martin Stjernholm  </rxml>
5f9df52002-06-17Martin Stjernholm  <result>11000</result> </test>
d0a2a92002-06-24Martin Stjernholm <test>
a5b77a2004-03-30Martin Stjernholm  <rxml type="string">
d0a2a92002-06-24Martin Stjernholm  <set variable="var.foo"></set> <if variable="var.foo">1</if><else>0</else>
1987692002-06-27Martin Stjernholm  <if variable="var.foo is ">1</if><else>0</else>
d0a2a92002-06-24Martin Stjernholm  <if variable="var.foo != ">1</if><else>0</else> <if variable="var.foo is 0">1</if><else>0</else> <if variable="var.foo = ?*">1</if><else>0</else>
a5b77a2004-03-30Martin Stjernholm  </rxml>
5f9df52002-06-17Martin Stjernholm  <result>11000</result> </test>
d0a2a92002-06-24Martin Stjernholm <test> <rxml type="string"> <set variable="var.foo" value="0"/> <if variable="var.foo">1</if><else>0</else>
1987692002-06-27Martin Stjernholm  <if variable="var.foo is ">1</if><else>0</else>
d0a2a92002-06-24Martin Stjernholm  <if variable="var.foo != ">1</if><else>0</else> <if variable="var.foo is 0">1</if><else>0</else> <if variable="var.foo = ?*">1</if><else>0</else>
1987692002-06-27Martin Stjernholm  </rxml>
5f9df52002-06-17Martin Stjernholm  <result>10111</result> </test>
d0a2a92002-06-24Martin Stjernholm <test> <rxml type="string"> <set variable="var.foo" expr="0"/> <!-- Same as value='0' in 2.1. --> <if variable="var.foo">1</if><else>0<!-- Reported 2.2 behavior. --></else>
1987692002-06-27Martin Stjernholm  <if variable="var.foo is ">1<!-- Reported bogus 2.2 behavior. --></if><else>0</else>
d0a2a92002-06-24Martin Stjernholm  <if variable="var.foo != ">1</if><else>0</else>
1987692002-06-27Martin Stjernholm  <if variable="var.foo is 0">1<!-- Reported 2.1 compat issue. --></if><else>0<!-- Bogus 2.2 behavior. --></else>
d0a2a92002-06-24Martin Stjernholm  <if variable="var.foo = ?*">1</if><else>0<!-- Bogus 2.2 behavior. --></else>
1987692002-06-27Martin Stjernholm  </rxml>
d0a2a92002-06-24Martin Stjernholm  <result>10111</result> </test> <test> <rxml type="string"> <set variable="var.foo" value="1"/> <if variable="var.foo">1</if><else>0</else>
1987692002-06-27Martin Stjernholm  <if variable="var.foo is ">1</if><else>0</else>
d0a2a92002-06-24Martin Stjernholm  <if variable="var.foo != ">1</if><else>0</else> <if variable="var.foo is 0">1</if><else>0</else> <if variable="var.foo = ?*">1</if><else>0</else>
1987692002-06-27Martin Stjernholm  </rxml>
d0a2a92002-06-24Martin Stjernholm  <result>10101</result> </test> <test> <rxml type="string"> <set variable="var.foo" expr="1"/> <if variable="var.foo">1</if><else>0</else>
1987692002-06-27Martin Stjernholm  <if variable="var.foo is ">1</if><else>0</else>
d0a2a92002-06-24Martin Stjernholm  <if variable="var.foo != ">1</if><else>0</else> <if variable="var.foo is 0">1</if><else>0</else> <if variable="var.foo = ?*">1</if><else>0</else>
1987692002-06-27Martin Stjernholm  </rxml>
5f9df52002-06-17Martin Stjernholm  <result>10101</result> </test>
a5b77a2004-03-30Martin Stjernholm  <test> <rxml type="string"> <cset variable="var.foo"></cset> <if variable="var.foo">1</if><else>0</else> <if variable="var.foo is ">1</if><else>0</else> <if variable="var.foo != ">1</if><else>0</else> <if variable="var.foo is 0">1</if><else>0</else> <if variable="var.foo = ?*">1</if><else>0</else> </rxml> <result>11000</result> </test>
b0ee962003-10-06Martin Stjernholm  <test> <rxml type="string"> <emit source="TESTER" test="6"> <if variable="_.integer">1</if><else>0</else> <if variable="_.float">1</if><else>0</else> <if variable="_.string">1</if><else>0</else> <if variable="_.array">1</if><else>0</else> <if variable="_.multiset">1</if><else>0</else> <if variable="_.mapping">1</if><else>0</else> <if variable="_.object">1</if><else>0</else> <if variable="_.program">1</if><else>0</else> <if variable="_.zero_integer">1</if><else>0</else> <if variable="_.zero_float">1</if><else>0</else> <if variable="_.empty_string">1</if><else>0</else> <if variable="_.empty_array">1</if><else>0</else> <if variable="_.empty_multiset">1</if><else>0</else> <if variable="_.empty_mapping">1</if><else>0</else> <if variable="_.zero_int_array">1</if><else>0</else> <if variable="_.zero_float_array">1</if><else>0</else> <if variable="_.empty_string_array">1</if><else>0</else> <if variable="_.empty_array_array">1</if><else>0</else> </emit> </rxml> <result>111111111110111110</result> </test>
cdece02001-01-29Per Hedbor 
717f142006-12-12Martin Stjernholm  <!-- ............................................................ --> <comment>Variable existence and null values</comment> <test> <rxml type="string"> <set variable="var.foo"/> <if variable-exists="var.foo">foo exists</if> <if variable-exists="var.bar">bar exists</if> </rxml> <result>foo exists</result> </test> <test> <rxml type="string"> <emit source="TESTER" test="3" skiprows="1" maxrows="2"> &TESTER.data; </emit> </rxml> <result></result> </test> <test> <rxml type="string"> <emit source="TESTER" test="3" skiprows="1" maxrows="2"> <copy-scope from="TESTER" to="var"/> &var.data; </emit> </rxml> <result></result> </test> <test> <rxml type="string">
f1c8512006-12-22Martin Stjernholm  <emit source="TESTER" test="3" skiprows="1" maxrows="2">
717f142006-12-12Martin Stjernholm  <emit source="values" from-scope="TESTER" sort="index"> &_.index;=[&_.value;] </emit>, </emit>
f1c8512006-12-22Martin Stjernholm  </rxml>
717f142006-12-12Martin Stjernholm  <result>counter=[1],counter=[2]data=[],</result> </test> <test> <rxml type="string"> <emit source="TESTER" test="3" skiprows="1" maxrows="2"> <insert variables="full" scope="TESTER"/>, </emit> </rxml> <result>counter=1,counter=2 data=TestNull(),</result> </test>
5a1b8a2001-03-24Martin Nilsson 
cdece02001-01-29Per Hedbor <!-- ............................................................ -->
fd4bce2006-12-12Martin Stjernholm <comment>Sort</comment>
cdece02001-01-29Per Hedbor  <test> <rxml><sort separator=,>1,3,5,0,8</sort></rxml> <result>0,1,3,5,8</result> </test>
b9c6c62008-08-07Martin Stjernholm 
cdece02001-01-29Per Hedbor <test no-strip-ws=""> <rxml><sort>1 3 5 0 8 </sort></rxml> <result>0 1 3 5 8 </result> </test>
95c6342010-01-22Martin Stjernholm  <test> <rxml> <sort></sort> </rxml> <result></result> </test>
cdece02001-01-29Per Hedbor 
5a1b8a2001-03-24Martin Nilsson 
cdece02001-01-29Per Hedbor <!-- ............................................................ --> <comment>If caller test</comment> <test> <rxml><set variable='var.a' value='foo'/><if match="&var.a; is foo">&var.a;x</if><else>y</else>&var.a;</rxml> <result>xfoo</result> </test> <test> <rxml><if match="foo is bar">x</if><else>y</else></rxml> <result>y</result> </test> <test> <rxml><if match="foo is foo">x</if><else>y</else></rxml> <result>x</result> </test> <test> <rxml><set variable='var.a' value='0'/><if variable="var.a is 0">x</if><else>y</else></rxml> <result>x</result> </test> <test> <rxml><set variable='a' value='4' scope='var'/><if variable="var.a is 4">x</if><else>y</else></rxml> <result>x</result> </test> <test> <rxml><set variable='var.a' value='3'/><if variable="var.a is 3">x</if><else>y</else></rxml> <result>x</result> </test>
5a1b8a2001-03-24Martin Nilsson 
cdece02001-01-29Per Hedbor <!-- ............................................................ --> <comment>Strlen</comment> <test> <rxml><strlen>a b</strlen></rxml> <result>3</result> </test>
098a922009-04-06Martin Stjernholm <test> <!-- Used to return 18 in 4.5 and earlier. --> <rxml><strlen>Roxen<b>&ouml;</b></strlen></rxml>
cdece02001-01-29Per Hedbor  <result>13</result> </test> <test> <rxml>a<strlen>b</strlen>c</rxml> <result>a1c</result> </test> <test> <rxml><strlen></strlen></rxml> <result>0</result> </test>
098a922009-04-06Martin Stjernholm  <test> <rxml> <set variable="var.x"><![CDATA[<>%&'"]]></set> <strlen>&var.x;</strlen> </rxml> <result>6</result> </test>
47e4462009-04-07Martin Stjernholm  <!-- 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>
cdece02001-01-29Per Hedbor 
5a1b8a2001-03-24Martin Nilsson 
cdece02001-01-29Per Hedbor <!-- ............................................................ --> <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>
75c2d02009-04-23Martin Stjernholm <rxml><if q>X</if><else>Y</else></rxml>
cdece02001-01-29Per Hedbor <glob>[Error (parse): *]Y</glob> </test> <test> <rxml><define if=q>a</define><if q=a>x</if><if q=b>b</if><if q>c</if></rxml> <result>x</result> </test> <test> <rxml><true/><define if=q><false/></define><then>A</then><if q>F</if><if q=1>F</if></rxml> <result>A</result> </test> <test> <rxml><false/><define if=q><true/></define><then>A</then><if q>T</if><if q=1>F</if></rxml> <result>T</result> </test>
913e852001-06-25Martin Stjernholm  <!-- ............................................................ --> <comment>Cond</comment> <test> <rxml><cond><default>x</default></cond></rxml> <result>x</result> </test>
dac1552001-09-27Martin Nilsson  <test> <rxml><cond><case match="1 == 2">a</case></cond></rxml> <result></result> </test> <test> <rxml><cond><case match="1 == 2">a</case><default>b</default></cond></rxml> <result>b</result> </test> <test> <rxml><cond><case match="1 == 1">a</case><default>b</default></cond></rxml> <result>a</result> </test> <test> <rxml><cond><case match="1 == 2"/><default>b</default></cond></rxml> <result>b</result> </test> <test> <rxml><cond><case match="1 == 1"/><default>b</default></cond></rxml> <result></result> </test> <test> <rxml><cond><case match="1 == 2"/><case match="1 == 1"/><case match="1 == 1">a</case></cond></rxml> <result></result> </test>
913e852001-06-25Martin Stjernholm 
5a1b8a2001-03-24Martin Nilsson 
cdece02001-01-29Per Hedbor <!-- ............................................................ --> <comment>Loops (for)</comment> <test> <rxml><for variable=var.i from=3 to=3><insert variable=var.i></for></rxml> <result>3</result> </test> <test> <rxml><for variable=var.i from=1 to=5>&var.i;</for>&var.i;</rxml> <result>123455</result> </test> <test> <rxml><for from=10 to=1>x</for></rxml> <result>xxxxxxxxxx</result> </test> <test> <rxml><for variable=var.i from=10 to=5><insert variable=var.i></for></rxml> <result>1098765</result> </test> <test> <rxml><for from=1 to=10>x</for></rxml> <result>xxxxxxxxxx</result> </test> <test> <rxml><for variable=var.i from=3 to=3 step=-1><insert variable=var.i></for></rxml> <result>3</result> </test> <test> <rxml><for variable=var.i from=1 to=3><for variable=var.j from=7 to=9><insert variable=var.j /></for>:<insert variable=var.i />;</for></rxml> <result>789:1;789:2;789:3;</result> </test> <test> <rxml><set variable='var.i' value='3'/><for variable='var.i' from='1' to='10' step='2'><insert variable='var.i'/></for></rxml> <result>13579</result> </test>
983ee52005-06-23Martin Stjernholm  <test> <rxml type="string"> <for variable='var.i' from='0' to='3' step='2'> &var.i; </for> </rxml> <result>02</result> </test> <test> <rxml type="string"> <set variable='var.i' value='0'/> <for from='0' to='3' step='2'> &var.i; <inc variable='var.i'/> </for> </rxml> <result>01</result> </test> <test> <rxml type="string"> <set variable='var.i' value='0'/> <for from='0' to='-3' step='-2'> &var.i; <inc variable='var.i'/> </for> </rxml> <result>01</result> </test>
495eb82005-06-22Martin Stjernholm  <test> <rxml><for variable='var.i' from='0' to='-1' step='1'>x</for></rxml> <result></result> </test> <test> <rxml><for variable='var.i' from='0' to='1' step='-1'>x</for></rxml> <result></result> </test>
983ee52005-06-23Martin Stjernholm  <test> <rxml><for from='0' to='-1' step='1'>x</for></rxml> <result></result> </test>
cdece02001-01-29Per Hedbor 
5a1b8a2001-03-24Martin Nilsson 
cdece02001-01-29Per Hedbor <!-- ............................................................ --> <comment>If tests</comment> <test> <rxml><define if=p><true/></define><define if=q><false/></define><if p and q>p&q</if><if p and p>p</if><if q and q>q</if></rxml> <result>p</result> </test> <test> <rxml><define if=p><true/></define><define if=q><false/></define><true/><if true>a</if><else>b</else><then>c</then></rxml> <result>ac</result> </test> <test> <rxml><define if=p><true/></define><define if=q><false/></define><if not p q>p&q</if><if not p p>p</if><if not q q>q</if></rxml> <result>p&qq</result> </test> <test> <rxml><define if=p><true/></define><define if=q><false/></define><false/><if false>a</if><else>b</else></rxml> <result>a</result> </test> <test> <rxml><define if=p><true/></define><define if=q><false/></define><false/><if p>A<if false>B</if></if></rxml> <result>AB</result> </test> <test> <rxml><define if=p><true/></define><define if=q><false/></define><if not p>p</if><if not q>q</if></rxml> <result>q</result> </test> <test> <rxml><define if=p><true/></define><define if=q><false/></define><false/><if true>a</if><else>b</else><then>c</then></rxml> <result>b</result> </test> <test> <rxml><define if=p><true/></define><define if=q><false/></define><if p q>p&q</if><if p p>p</if><if q q>q</if></rxml> <result>p</result> </test> <test> <rxml><define if=p><true/></define><define if=q><false/></define><if p>p</if><if q>q</if></rxml> <result>p</result> </test> <test> <rxml><define if=p><true/></define><define if=q><false/></define><if not p and q>p&q</if><if not p and p>p</if><if not q and q>q</if></rxml> <result>p&qq</result> </test> <test> <rxml><define if=p><true/></define><define if=q><false/></define><if not p or q>p|q</if><if not p or p>p</if><if not q or q>q</if></rxml> <result>q</result> </test> <test> <rxml><define if=p><true/></define><define if=q><false/></define><if p or q>p|q</if><if p or p>p</if><if q or q>q</if></rxml> <result>p|qp</result> </test> <test> <rxml><define if=p><true/></define><define if=q><false/></define><true/><if false>a</if><else>b</else></rxml> <result>b</result> </test>
9057062001-01-30Martin Nilsson 
5a1b8a2001-03-24Martin Nilsson 
9057062001-01-30Martin Nilsson <!-- ............................................................ --> <comment>Elseif tests</comment> <test> <rxml><set variable="var.x">Y</set><if variable="var.x = Y">A</if><elseif variable="var.x = Y">B</elseif><else>C</else></rxml> <result>A</result> </test> <test> <rxml><set variable="var.x">Y</set><if variable="var.x = X">A</if><elseif variable="var.x = Y">B</elseif><else>C</else></rxml> <result>B</result> </test> <test> <rxml><set variable="var.x">Z</set><if variable="var.x = Y">X</if><elseif variable="var.x = Y">B</elseif><else>C</else></rxml> <result>C</result> </test>
5a1b8a2001-03-24Martin Nilsson 
9057062001-01-30Martin Nilsson <!-- ............................................................ --> <comment>If plugins</comment> <test> <rxml><if exists="/index.html">yes</if></rxml> <result>yes</result> </test>
0650be2001-09-13Martin Nilsson  <test> <rxml><if exists="/internal-roxen-roxen">yes</if></rxml> <result>yes</result> </test> <test> <rxml><if exists="internal-roxen-unit">yes</if></rxml> <result>yes</result> </test> <test> <rxml><if exists="/internal-gopher-image">yes</if></rxml> <result>yes</result> </test>
9057062001-01-30Martin Nilsson  <test> <rxml><if exists="/does_not_exist">yes</if></rxml> <result></result> </test>
0650be2001-09-13Martin Nilsson  <test> <rxml><if exists="/hidden.inv">yes</if></rxml> <result></result> </test> <test> <rxml><if internal-exists="/index.html">yes</if></rxml> <result>yes</result> </test> <test> <rxml><if internal-exists="/hidden.inv">yes</if></rxml> <result>yes</result> </test>
9057062001-01-30Martin Nilsson  <test> <rxml><if nserious="1">yes</if></rxml> <result></result> </test> <test> <rxml><if module="rxmltags">yes</if></rxml> <result>yes</result> </test> <test> <rxml><if module="nomodule">yes</if></rxml> <result></result> </test> <test> <rxml><true/><if true="1">yes</if></rxml> <result>yes</result> </test> <test> <rxml><false/><if true="1">yes</if></rxml> <result></result> </test> <test> <rxml><true/><if false="1">yes</if></rxml> <result></result> </test> <test> <rxml><false/><if false="1">yes</if></rxml> <result>yes</result> </test> <test> <rxml><if match="buhu is buhu">1</if></rxml> <result>1</result> </test> <test> <rxml><if match="Buhu is buhu">1</if></rxml> <result>1</result> </test> <test> <rxml><if Match="Buhu is buhu">1</if></rxml> <result></result> </test> <test> <rxml><if Match="buhu is buhu">1</if></rxml> <result>1</result> </test> <test> <rxml><if match="a = a">1</if></rxml> <result>1</result> </test> <test> <rxml><if match="a = a = a = a">1</if></rxml> <result></result> </test> <test> <rxml><if sizeof="var.basun = 0">1</if></rxml> <result>1</result> </test> <test> <rxml><if sizeof="var.basun">1</if></rxml> <result></result> </test>
a868532001-08-29Martin Nilsson  <test> <rxml><set variable="var.basun" split=",">1,2</set><if sizeof="var.basun = 2">x</if></rxml> <result>x</result> </test>
9057062001-01-30Martin Nilsson  <test> <rxml><set variable="var.basun">abc</set><if sizeof="var.basun == 3">7</if></rxml> <result>7</result> </test> <test> <rxml><set variable="var.basun">abc</set><if sizeof="var.basun == 4">7</if></rxml> <result></result> </test> <test> <rxml><set variable="var.x">A</set><if variable="var.x == a">1</if></rxml> <result>1</result> </test> <test> <rxml><set variable="var.x">A</set><if Variable="var.x == A">1</if></rxml> <result>1</result> </test> <test> <rxml><set variable="var.x">A</set><if Variable="var.x == a">1</if></rxml> <result></result> </test>
9dc8ef2001-04-21Martin Nilsson  <test> <add what="request_header" name="accept" value="image/gif, image/jpeg"/> <rxml><if accept="image/jpeg">1</if></rxml> <result>1</result> </test> <test> <add what="request_header" name="accept" value="audio/mpeg, image/jpeg"/> <rxml><if accept="image/*">1</if></rxml> <result>1</result> </test> <test> <add what="request_header" name="accept" value="audio/mpeg, image/jpeg"/> <rxml><if accept="text/plain">1</if></rxml> <result></result>
9057062001-01-30Martin Nilsson </test>
50644b2001-06-21Martin Nilsson  <test>
8ea32a2008-01-14Martin Stjernholm <rxml><set variable="var.date"><date strftime="%Y%m%d"/></set><if date="&var.date;"
50644b2001-06-21Martin Nilsson  after="1">X[&var.date;]</if>Y</rxml> <result>Y</result> </test> <test>
8ea32a2008-01-14Martin Stjernholm <rxml><set variable="var.date"><date strftime="%Y%m%d"/></set><if date="&var.date;"
50644b2001-06-21Martin Nilsson  after="1" inclusive="1">&var.date;X</if><else>[&var.date;]</else>Y</rxml> <result>XY</result> </test> <test>
8ea32a2008-01-14Martin Stjernholm <rxml><set variable="var.date"><date strftime="%Y%m%d"/></set><if date="&var.date;"
50644b2001-06-21Martin Nilsson  before="1">&var.date;X[&var.date;]</if>Y</rxml> <result>Y</result> </test> <test>
8ea32a2008-01-14Martin Stjernholm <rxml><set variable="var.date"><date strftime="%Y%m%d"/></set><if date="&var.date;"
50644b2001-06-21Martin Nilsson  before="1" inclusive="1">&var.date;X</if><else>[&var.date;]</else>Y</rxml> <result>XY</result> </test> <test>
8ea32a2008-01-14Martin Stjernholm <rxml><set variable="var.date"><date strftime="%Y%m%d" days="-1"/></set><if date="&var.date;"
50644b2001-06-21Martin Nilsson  after="1">&var.date;X</if><else>[&var.date;]</else>Y</rxml> <result>XY</result> </test> <test>
8ea32a2008-01-14Martin Stjernholm <rxml><set variable="var.date"><date strftime="%Y%m%d" days="1"/></set><if date="&var.date;"
50644b2001-06-21Martin Nilsson  before="1">&var.date;X</if><else>[&var.date;]</else>Y</rxml> <result>XY</result> </test>
0ca16d2001-08-31Martin Nilsson  <test>
8ea32a2008-01-14Martin Stjernholm <rxml><set variable="var.date"><date strftime="%Y-%m-%d"/></set><if date="&var.date;"
0ca16d2001-08-31Martin Nilsson  after="1">&var.date;X[&var.date;]</if>Y</rxml> <result>Y</result> </test> <test>
8ea32a2008-01-14Martin Stjernholm <rxml><set variable="var.date"><date strftime="%Y-%m-%d"/></set><if date="&var.date;"
0ca16d2001-08-31Martin Nilsson  after="1" inclusive="1">&var.date;X</if><else>[&var.date;]</else>Y</rxml> <result>XY</result> </test> <test>
8ea32a2008-01-14Martin Stjernholm <rxml><set variable="var.date"><date strftime="%Y-%m-%d"/></set><if date="&var.date;"
0ca16d2001-08-31Martin Nilsson  before="1">&var.date;X[&var.date;]</if>Y</rxml> <result>Y</result> </test> <test>
8ea32a2008-01-14Martin Stjernholm <rxml><set variable="var.date"><date strftime="%Y-%m-%d"/></set><if date="&var.date;"
0ca16d2001-08-31Martin Nilsson  before="1" inclusive="1">&var.date;X</if><else>[&var.date;]</else>Y</rxml> <result>XY</result> </test> <test>
8ea32a2008-01-14Martin Stjernholm <rxml><set variable="var.date"><date strftime="%Y-%m-%d" days="-1"/></set><if date="&var.date;"
0ca16d2001-08-31Martin Nilsson  after="1">&var.date;X</if><else>[&var.date;]</else>Y</rxml> <result>XY</result> </test> <test>
8ea32a2008-01-14Martin Stjernholm <rxml><set variable="var.date"><date strftime="%Y-%m-%d" days="1"/></set><if date="&var.date;"
0ca16d2001-08-31Martin Nilsson  before="1">&var.date;X</if><else>[&var.date;]</else>Y</rxml> <result>XY</result> </test>
a5425f2001-06-22Martin Nilsson  <test>
8ea32a2008-01-14Martin Stjernholm <rxml><set variable="var.time"><date strftime="%H%M"/></set><if time="&var.time;"
a5425f2001-06-22Martin Nilsson  after="1">&var.time;X[&var.date;]</if>Y</rxml> <result>Y</result> </test> <test>
8ea32a2008-01-14Martin Stjernholm <rxml><set variable="var.time"><date strftime="%H%M"/></set><if time="&var.time;"
a5425f2001-06-22Martin Nilsson  after="1" inclusive="1">&var.time;X</if><else>[&var.date;]</else>Y</rxml> <result>XY</result> </test> <test>
8ea32a2008-01-14Martin Stjernholm <rxml><set variable="var.time"><date strftime="%H%M"/></set><if time="&var.time;"
a5425f2001-06-22Martin Nilsson  before="1">&var.time;X[&var.date;]</if>Y</rxml> <result>Y</result> </test> <test>
8ea32a2008-01-14Martin Stjernholm <rxml><set variable="var.time"><date strftime="%H%M"/></set><if time="&var.time;"
a5425f2001-06-22Martin Nilsson  before="1" inclusive="1">&var.time;X</if><else>[&var.time;]</else>Y</rxml> <result>XY</result> </test>
dfbde72008-08-07Martin Stjernholm <test> <rxml> <set variable="var.time"><date strftime="%H%M" minutes="-1"/></set> <if variable="var.time is 2359">X</if> <elseif time="&var.time;" after="1">&var.time;X</elseif> <else>[&var.time;]</else> </rxml>
a5425f2001-06-22Martin Nilsson  <result>X</result> </test>
dfbde72008-08-07Martin Stjernholm <test> <rxml> <set variable="var.time"><date strftime="%H%M" minutes="1"/></set> <if variable="var.time is 0000">X</if> <elseif time="&var.time;" before="1">&var.time;X</elseif> <else>[&var.time;]</else> </rxml>
a5425f2001-06-22Martin Nilsson  <result>X</result> </test>
9057062001-01-30Martin Nilsson  <comment>Missing test: if user</comment> <comment>Missing test: if group</comment> <comment>Missing test: if accept</comment> <comment>Missing test: if config</comment> <comment>Missing test: if cookie</comment> <comment>Missing test: if client</comment> <comment>Missing test: if defined</comment> <comment>Missing test: if domain</comment> <comment>Missing test: if ip</comment> <comment>Missing test: if language</comment> <comment>Missing test: if pragma</comment> <comment>Missing test: if prestate</comment> <comment>Missing test: if referrer</comment> <comment>Missing test: if supports</comment> <comment>Missing test: if clientvar</comment>
9dc8ef2001-04-21Martin Nilsson <comment>Missing test: <cond></comment> <!-- ............................................................ --> <comment>Path emit plugin</comment>
b9c6c62008-08-07Martin Stjernholm <test> <rxml><emit source="path" path="/a/b/c">&_.name;,&_.path;|</emit></rxml>
9dc8ef2001-04-21Martin Nilsson <result>,/|a,/a|b,/a/b|c,/a/b/c|</result> </test>
b9c6c62008-08-07Martin Stjernholm <test> <rxml><emit source="path" path="/a/b/c" trim="/c">&_.name;,&_.path;|</emit></rxml>
9dc8ef2001-04-21Martin Nilsson <result>,/|a,/a|b,/a/b|</result> </test>
b9c6c62008-08-07Martin Stjernholm <test> <rxml><emit source="path" path="/a/b/c" skip="1">&_.name;,&_.path;|</emit></rxml>
9dc8ef2001-04-21Martin Nilsson <result>a,/a|b,/a/b|c,/a/b/c|</result> </test>
b9c6c62008-08-07Martin Stjernholm <test> <rxml><emit source="path" path="/a/b/c" skip-end="1">&_.name;,&_.path;|</emit></rxml>
9dc8ef2001-04-21Martin Nilsson <result>,/|a,/a|b,/a/b|</result>
9057062001-01-30Martin Nilsson </test>
5a1b8a2001-03-24Martin Nilsson 
cdece02001-01-29Per Hedbor <!-- ............................................................ --> <comment>Emit tests</comment> <test> <rxml><emit source="values" values="1,2,3" split=",">&_.value;:</emit></rxml> <result>1:2:3:</result> </test>
ed33482001-03-15Martin Nilsson  <test> <rxml><emit source="OTESTER">&_.c;:</emit></rxml> <result>1:2:3:4:</result> </test>
cdece02001-01-29Per Hedbor  <test> <rxml><emit source="values" values="a&#0;b">&#0;&_.value;:</emit></rxml> <result>a:b:</result> </test> <test> <rxml><emit split="," source="values" values="a,b,c">&_.value;<emit split="," source="values" values="1,2,3">&_.value;<delimiter>:</delimiter ></emit><delimiter>-</delimiter></emit></rxml> <result>a1:2:3-b1:2:3-c1:2:3</result> </test>
ed33482001-03-15Martin Nilsson  <test> <rxml><emit source="OTESTER">&_.c;<emit source="OTESTER">&_.c;<delimiter>:</delimiter ></emit><delimiter>-</delimiter></emit></rxml> <result>11:2:3:4-21:2:3:4-31:2:3:4-41:2:3:4</result> </test>
cdece02001-01-29Per Hedbor  <test> <rxml><emit source="values" values="a.b.c" split=".">&_.value;&_.counter;</emit></rxml> <result>a1b2c3</result> </test>
ed33482001-03-15Martin Nilsson  <test> <rxml><emit source="OTESTER">&_.c;&_.counter;</emit></rxml> <result>11223344</result> </test>
cdece02001-01-29Per Hedbor  <test> <rxml><emit source="values" values="a.b.c" split="." do-once="1">&_.value;:</emit></rxml> <result>a:b:c:</result> </test>
ed33482001-03-15Martin Nilsson  <test> <rxml><emit source="OTESTER">&_.c;:</emit></rxml> <result>1:2:3:4:</result> </test>
cdece02001-01-29Per Hedbor  <test>
b9c6c62008-08-07Martin Stjernholm <rxml><emit source="values" values="abcdefgh" split="" maxrows="4">&_.value; </emit></rxml>
cdece02001-01-29Per Hedbor <result>a b c d</result> </test>
ed33482001-03-15Martin Nilsson  <test>
b9c6c62008-08-07Martin Stjernholm <rxml><emit source="OTESTER" test="2" maxrows="4">&_.data; </emit></rxml>
ed33482001-03-15Martin Nilsson <result>aa a aa a</result> </test>
cdece02001-01-29Per Hedbor  <test>
b9c6c62008-08-07Martin Stjernholm <rxml><emit source="values" values="a,b,c" split="," maxrows="100">&_.value; </emit></rxml>
cdece02001-01-29Per Hedbor <result>a b c</result> </test>
ed33482001-03-15Martin Nilsson  <test>
b9c6c62008-08-07Martin Stjernholm <rxml><emit source="OTESTER" maxrows="100">&_.c; </emit></rxml>
ed33482001-03-15Martin Nilsson <result>1 2 3 4</result> </test>
cdece02001-01-29Per Hedbor  <test> <rxml><emit source="values" values="a,b,c" split="," skiprows="100">&_.value;:</emit></rxml> <result></result> </test>
ed33482001-03-15Martin Nilsson  <test> <rxml><emit source="OTESTER" skiprows="100">&_.c;:</emit></rxml> <result></result> </test>
cdece02001-01-29Per Hedbor  <test> <rxml><emit source="values" values="a,b,c" split="," skiprows="100" do-once="1">&_.value;:</emit></rxml> <result>:</result> </test>
ed33482001-03-15Martin Nilsson  <test> <rxml><emit source="OTESTER" skiprows="100" do-once="1">&_.c;:</emit></rxml> <result>:</result> </test>
53c3162001-02-19Martin Nilsson  <test> <rxml><emit source="values" values="a,b,c" split="," skiprows="0">&_.value;</emit></rxml> <result>abc</result> </test>
ed33482001-03-15Martin Nilsson  <test> <rxml><emit source="OTESTER" skiprows="0">&_.c;</emit></rxml> <result>1234</result> </test>
53c3162001-02-19Martin Nilsson  <test> <rxml><emit source="values" values="a,b,c" split="," skiprows="-2">&_.value;</emit></rxml> <result>bc</result> </test>
ed33482001-03-15Martin Nilsson <test> <rxml><emit source="OTESTER" skiprows="-3">&_.c;</emit></rxml>
53c3162001-02-19Martin Nilsson <result>234</result> </test>
cdece02001-01-29Per Hedbor  <test>
b9c6c62008-08-07Martin Stjernholm <rxml><emit source="values" values="a,b,c,d,e" split="," skiprows="2">&_.value; </emit></rxml>
cdece02001-01-29Per Hedbor <result>c d e</result> </test>
ed33482001-03-15Martin Nilsson  <test>
b9c6c62008-08-07Martin Stjernholm <rxml><emit source="OTESTER" skiprows="2">&_.c; </emit></rxml>
ed33482001-03-15Martin Nilsson <result>3 4</result> </test>
cdece02001-01-29Per Hedbor  <test> <rxml><emit source="values" values="a.b.c.d.e.f.g" split="." skiprows="2" maxrows="2" remainderinfo="var.rem">&_.value; </emit>&var.rem;</rxml> <result>c d 3</result> </test>
ce72d42001-06-01Martin Nilsson  <test> <rxml><emit source="TESTER" remainderinfo="var.rem">&_.c;:</emit>&var.rem;</rxml> <result>1:2:3:4:0</result> </test>
ed33482001-03-15Martin Nilsson  <test> <rxml><emit source="OTESTER" test="2" skiprows="3" maxrows="2" remainderinfo="var.rem">&_.data; </emit>&var.rem;</rxml> <result>a bb 14</result> </test>
cdece02001-01-29Per Hedbor  <test> <rxml><set variable="var.txt">1 2 3 4 5</set><emit source="values" values="&var.txt;" advanced="lines">&var.txt;&_.value;:</emit></rxml> <result>1:2:3:4:5:</result> </test> <test> <rxml><emit source="TESTER" sort="d">&_.c;:</emit></rxml> <result>4:3:1:2:</result> </test>
ed33482001-03-15Martin Nilsson  <test> <rxml><emit source="OTESTER" sort="d">&_.c;:</emit></rxml> <result>4:3:1:2:</result> </test>
cdece02001-01-29Per Hedbor  <test> <rxml><emit source="TESTER" sort="+d">&_.c;:</emit></rxml> <result>4:3:1:2:</result> </test>
ed33482001-03-15Martin Nilsson  <test> <rxml><emit source="OTESTER" sort="+d">&_.c;:</emit></rxml> <result>4:3:1:2:</result> </test>
cdece02001-01-29Per Hedbor  <test> <rxml><emit source="TESTER" sort="-d">&_.c;:</emit></rxml> <result>2:1:3:4:</result> </test>
ed33482001-03-15Martin Nilsson  <test> <rxml><emit source="OTESTER" sort="-d">&_.c;:</emit></rxml> <result>2:1:3:4:</result> </test>
39ba852002-06-18Martin Stjernholm  <test> <rxml><emit source="TESTER" sort="*d">&_.c;:</emit></rxml> <result>1:3:4:2:</result> </test> <test> <rxml><emit source="TESTER" sort="*+d">&_.c;:</emit></rxml> <result>1:3:4:2:</result> </test> <test> <rxml><emit source="TESTER" sort="*-d">&_.c;:</emit></rxml> <result>2:4:3:1:</result> </test> <test> <rxml><emit source="TESTER" sort="*e">&_.c;:</emit></rxml> <result>4:1:2:3:</result> </test> <test> <rxml><emit source="TESTER" sort="-*e">&_.c;:</emit></rxml> <result>3:2:1:4:</result> </test> <test> <rxml><emit source="TESTER" sort="+*f">&_.c;:</emit></rxml> <result>2:1:4:3:</result> </test>
cdece02001-01-29Per Hedbor  <test> <rxml><emit source="TESTER" sort="a,d">&_.c;:</emit></rxml> <result>1:2:4:3:</result> </test>
ed33482001-03-15Martin Nilsson  <test> <rxml><emit source="OTESTER" sort="a,d">&_.c;:</emit></rxml> <result>1:2:4:3:</result> </test>
cdece02001-01-29Per Hedbor  <test> <rxml><emit source="TESTER" sort="a,-d">&_.c;:</emit></rxml> <result>2:1:4:3:</result> </test>
ed33482001-03-15Martin Nilsson  <test> <rxml><emit source="OTESTER" sort="a,-d">&_.c;:</emit></rxml> <result>2:1:4:3:</result> </test>
cdece02001-01-29Per Hedbor  <test> <rxml><emit source="TESTER" sort="b">&_.c;:</emit></rxml> <result>4:2:1:3:</result> </test>
ed33482001-03-15Martin Nilsson  <test> <rxml><emit source="OTESTER" sort="b">&_.c;:</emit></rxml> <result>4:2:1:3:</result> </test>
2d8cdf2001-06-11Martin Nilsson 
50644b2001-06-21Martin Nilsson <test>
9f6f802011-11-14Martin Stjernholm <rxml><emit source="TESTER" test="3" sort="data"><set variable="x">1</set>&_.data;:</emit></rxml> <!-- Note: Many of the values in this set have no well defined sort order at all. This test should perhaps be removed. -->
2d8cdf2001-06-11Martin Nilsson <result>:::0::a:</result> </test>
cdece02001-01-29Per Hedbor  <test> <rxml><emit source="TESTER" sort="c" filter="a=??x">&_.c;:</emit></rxml> <result>1:2:4:</result> </test>
ed33482001-03-15Martin Nilsson  <test> <rxml><emit source="OTESTER" sort="c" filter="a=??x">&_.c;:</emit></rxml> <result>1:2:4:</result> </test>
cdece02001-01-29Per Hedbor  <test> <rxml><emit source="TESTER" sort="c" filter="a=??x, b=**o">&_.c;:</emit></rxml> <result>1:2:</result> </test>
ed33482001-03-15Martin Nilsson  <test> <rxml><emit source="OTESTER" sort="c" filter="a=??x, b=**o">&_.c;:</emit></rxml> <result>1:2:</result> </test>
cdece02001-01-29Per Hedbor  <test> <rxml><emit source="TESTER" sort="c" filter="a=??x,b=*">&_.c;:</emit></rxml> <result>1:2:4:</result> </test>
ed33482001-03-15Martin Nilsson  <test> <rxml><emit source="OTESTER" sort="c" filter="a=??x,b=*">&_.c;:</emit></rxml> <result>1:2:4:</result> </test>
cdece02001-01-29Per Hedbor  <test> <rxml><emit source="TESTER" sort="c" filter="a=??x" do-once="1">&_.c;:</emit></rxml> <result>1:2:4:</result> </test>
ed33482001-03-15Martin Nilsson  <test> <rxml><emit source="OTESTER" sort="c" filter="a=??x" do-once="1">&_.c;:</emit></rxml> <result>1:2:4:</result> </test>
cdece02001-01-29Per Hedbor  <test> <rxml><emit source="TESTER" sort="c" filter="a=??y" do-once="1">&_.c;:</emit></rxml> <result>:</result> </test>
ed33482001-03-15Martin Nilsson  <test> <rxml><emit source="OTESTER" sort="c" filter="a=??y" do-once="1">&_.c;:</emit></rxml> <result>:</result> </test>
cdece02001-01-29Per Hedbor  <test> <rxml><emit source="TESTER" sort="-b" filter="a=??x" skiprows="1">&_.c;:</emit></rxml> <result>2:4:</result> </test>
ed33482001-03-15Martin Nilsson  <test> <rxml><emit source="OTESTER" sort="-b" filter="a=??x" skiprows="1">&_.c;:</emit></rxml> <result>2:4:</result> </test>
cdece02001-01-29Per Hedbor  <test> <rxml><emit source="TESTER" sort="c" filter="a=??x" maxrows="2">&_.c;:</emit></rxml> <result>1:2:</result> </test>
ed33482001-03-15Martin Nilsson  <test> <rxml><emit source="OTESTER" sort="c" filter="a=??x" maxrows="2">&_.c;:</emit></rxml> <result>1:2:</result> </test>
cdece02001-01-29Per Hedbor  <test> <rxml><emit source="TESTER" sort="c" filter="a=??x" maxrows="2" remainderinfo="var.rem">&_.c;:</emit>&var.rem;</rxml> <result>1:2:1</result> </test>
ed33482001-03-15Martin Nilsson  <test> <rxml><emit source="OTESTER" sort="c" filter="a=??x" maxrows="2" remainderinfo="var.rem">&_.c;:</emit>&var.rem;</rxml> <result>1:2:1</result> </test>
ce72d42001-06-01Martin Nilsson  <test> <rxml><emit source="OTESTER" remainderinfo="var.rem">&_.c;:</emit>&var.rem;</rxml> <result>1:2:3:4:0</result> </test>
cdece02001-01-29Per Hedbor  <test> <rxml><emit source="TESTER" sort="-b" filter="a=??x" skiprows="100">&_.c;:</emit></rxml> <result></result> </test>
ed33482001-03-15Martin Nilsson  <test> <rxml><emit source="OTESTER" sort="-b" filter="a=??x" skiprows="100">&_.c;:</emit></rxml> <result></result> </test>
cdece02001-01-29Per Hedbor  <test> <rxml><emit source="TESTER" sort="c" filter="a=??x" maxrows="100">&_.c;:</emit></rxml> <result>1:2:4:</result> </test>
ed33482001-03-15Martin Nilsson  <test> <rxml><emit source="OTESTER" sort="c" filter="a=??x" maxrows="100">&_.c;:</emit></rxml> <result>1:2:4:</result> </test>
cdece02001-01-29Per Hedbor 
dad37b2001-09-25Martin Nilsson <test> <rxml><emit source="TESTER" rowinfo="var.row">&_.c;&var.row;:</emit>&var.row;</rxml>
cdece02001-01-29Per Hedbor <result>14:24:34:44:4</result> </test>
ed33482001-03-15Martin Nilsson 
dad37b2001-09-25Martin Nilsson <test> <rxml><emit source="OTESTER" rowinfo="var.row">&_.c;&var.row;:</emit>&var.row;</rxml>
ed33482001-03-15Martin Nilsson <result>14:24:34:44:4</result> </test>
53c3162001-02-19Martin Nilsson 
dad37b2001-09-25Martin Nilsson <test> <rxml><emit source="TESTER" sort="c" filter="a=??x" rowinfo="var.row">&_.c;&var.row;:</emit>&var.row;</rxml>
53c3162001-02-19Martin Nilsson <result>13:23:43:3</result> </test>
ed33482001-03-15Martin Nilsson 
dad37b2001-09-25Martin Nilsson <test> <rxml><emit source="OTESTER" sort="c" filter="a=??x" rowinfo="var.row">&_.c;&var.row;:</emit>&var.row;</rxml> <result>13:23:43:3</result> </test> <test> <rxml><emit source="TESTER" sort="c" filter="a=basun" rowinfo="var.row" do-once="1">&_.counter;&var.row;,&_.c;:</emit>&var.row;</rxml> <result>10,:0</result> </test> <test> <rxml><emit source="OTESTER" sort="c" filter="a=basun" rowinfo="var.row" do-once="1">&_.counter;&var.row;,&_.c;:</emit>&var.row;</rxml>
ed33482001-03-15Martin Nilsson <result>10,:0</result> </test>
cdece02001-01-29Per Hedbor  <test> <rxml><emit source="TESTER" test="2" filter="data=?">&_.data;:</emit></rxml> <result>a:a:b:c:a:d:e:a:a:a:</result> </test>
ed33482001-03-15Martin Nilsson  <test> <rxml><emit source="OTESTER" test="2" filter="data=?">&_.data;:</emit></rxml> <result>a:a:b:c:a:d:e:a:a:a:</result> </test>
cdece02001-01-29Per Hedbor  <test> <rxml><emit source="TESTER" test="2" filter="data=?" skiprows="3" maxrows="5">&_.data;:</emit></rxml> <result>c:a:d:e:a:</result> </test>
ed33482001-03-15Martin Nilsson  <test> <rxml><emit source="OTESTER" test="2" filter="data=?" skiprows="3" maxrows="5">&_.data;:</emit></rxml> <result>c:a:d:e:a:</result> </test>
cdece02001-01-29Per Hedbor  <test> <rxml><emit source="TESTER" test="2" filter="data=?">&_.data;<delimiter>:</delimiter></emit></rxml> <result>a:a:b:c:a:d:e:a:a:a</result> </test>
ed33482001-03-15Martin Nilsson  <test> <rxml><emit source="OTESTER" test="2" filter="data=?">&_.data;<delimiter>:</delimiter></emit></rxml> <result>a:a:b:c:a:d:e:a:a:a</result> </test>
cdece02001-01-29Per Hedbor  <test> <rxml><emit source="TESTER" test="2" filter="data=?" skiprows="3">&_.data;<delimiter>:</delimiter></emit></rxml> <result>c:a:d:e:a:a:a</result> </test>
ed33482001-03-15Martin Nilsson  <test> <rxml><emit source="OTESTER" test="2" filter="data=?" skiprows="3">&_.data;<delimiter>:</delimiter></emit></rxml> <result>c:a:d:e:a:a:a</result> </test>
cdece02001-01-29Per Hedbor  <test> <rxml><emit source="TESTER" test="2" filter="data=?" skiprows="3" maxrows="5">&_.data;<delimiter>:</delimiter></emit></rxml> <result>c:a:d:e:a</result> </test>
ed33482001-03-15Martin Nilsson  <test> <rxml><emit source="OTESTER" test="2" filter="data=?" skiprows="3" maxrows="5">&_.data;<delimiter>:</delimiter></emit></rxml> <result>c:a:d:e:a</result> </test>
53c3162001-02-19Martin Nilsson  <test> <rxml><true/><emit source="values" values="a" filter="value=c">.</emit><then>a</then><else>b</else></rxml> <result>b</result> </test>
ed33482001-03-15Martin Nilsson  <test> <rxml><true/><emit source="OTESTER" test="2" filter="data=x" >.</emit><then>a</then><else>b</else></rxml> <result>b</result> </test>
53c3162001-02-19Martin Nilsson  <test> <rxml><true/><emit source="values" values="a">.</emit><then>a</then><else>b</else></rxml> <result>.a</result> </test>
ed33482001-03-15Martin Nilsson  <test> <rxml><true/><emit source="OTESTER" test="2" filter="data=e" >.</emit><then>a</then><else>b</else></rxml> <result>.a</result> </test>
816b012001-04-02Martin Nilsson 
50644b2001-06-21Martin Nilsson <test>
9f6f802011-11-14Martin Stjernholm <rxml><emit source="TESTER" test="3"><set variable="x">1</set>&_.data;&_.data;,</emit></rxml>
816b012001-04-02Martin Nilsson <result>aa,,,,01,,</result> </test>
50644b2001-06-21Martin Nilsson <test><!-- make sure the emit source is resetted -->
9f6f802011-11-14Martin Stjernholm <rxml><emit source="TESTER" test="3"><set variable="x">1</set>&_.data;&_.data;,</emit></rxml>
816b012001-04-02Martin Nilsson <result>aa,,,,01,,</result> </test>
50644b2001-06-21Martin Nilsson <test>
9f6f802011-11-14Martin Stjernholm <rxml><emit source="OTESTER" test="3"><set variable="x">1</set>&_.data;&_.data;,</emit></rxml>
816b012001-04-02Martin Nilsson <result>aa,,,,01,,</result> </test>
50644b2001-06-21Martin Nilsson <test><!-- make sure the emit source is resetted -->
9f6f802011-11-14Martin Stjernholm <rxml><emit source="OTESTER" test="3"><set variable="x">1</set>&_.data;&_.data;,</emit></rxml>
816b012001-04-02Martin Nilsson <result>aa,,,,01,,</result> </test>
9011e92001-04-08Martin Nilsson  <test> <rxml><emit source="TESTER" test="4">&_.a; &_.b; &_.c;<delimiter>,</delimiter></emit></rxml> <result>1 aa ca,2 ba cb,3 ab ba</result> </test>
6d5e122001-04-08Martin Nilsson  <test> <rxml><emit source="OTESTER" test="4">&_.a; &_.b; &_.c;<delimiter>,</delimiter></emit></rxml> <result>1 aa ca,2 ba cb,3 ab ba</result> </test>
9011e92001-04-08Martin Nilsson  <test> <rxml><emit source="TESTER" test="4" filter="b=a*">&_.a;</emit></rxml> <result>13</result> </test>
6d5e122001-04-08Martin Nilsson  <test> <rxml><emit source="OTESTER" test="4" filter="b=a*">&_.a;</emit></rxml> <result>13</result> </test>
9011e92001-04-08Martin Nilsson  <test> <rxml><emit source="TESTER" test="4" filter="c=c*">&_.a;</emit></rxml> <result>12</result> </test>
6d5e122001-04-08Martin Nilsson  <test> <rxml><emit source="OTESTER" test="4" filter="c=c*">&_.a;</emit></rxml> <result>12</result> </test>
9011e92001-04-08Martin Nilsson  <test> <rxml><emit source="TESTER" test="4" sort="b">&_.a;</emit></rxml> <result>132</result> </test>
6d5e122001-04-08Martin Nilsson  <test> <rxml><emit source="OTESTER" test="4" sort="b">&_.a;</emit></rxml> <result>132</result> </test>
9011e92001-04-08Martin Nilsson  <test> <rxml><emit source="TESTER" test="4" sort="c">&_.a;</emit></rxml> <result>312</result> </test>
6d5e122001-04-08Martin Nilsson  <test> <rxml><emit source="OTESTER" test="4" sort="c">&_.a;</emit></rxml> <result>312</result> </test>
61ed2c2001-05-31Martin Nilsson  <test> <rxml><emit source="STESTER">&_.c;</emit></rxml> <result>1234</result> </test> <test> <rxml><emit source="STESTER" skiprows="2">&_.c;</emit></rxml> <result>1234</result> </test> <test> <rxml><emit source="STESTER" maxrows="2">&_.c;</emit></rxml> <result>1234</result> </test> <test> <rxml><emit source="STESTER" sort="d">&_.c;</emit></rxml> <result>1234</result> </test> <test> <rxml><emit source="STESTER" sort="d" skiprows="2" maxrows="1">&_.c;</emit></rxml> <result>1234</result> </test>
ce72d42001-06-01Martin Nilsson  <test> <rxml>&var.rem;<emit source="STESTER" remainderinfo="var.rem">&_.c;:</emit>&var.rem;</rxml> <result>1:2:3:4:0</result> </test>
a4d5842009-04-15Martin Stjernholm  <test> <rxml type="string"> <cache> <set variable="var.num" value="1,2,3,4,5,6,7"/> <emit source="values" variable="var.num" split=","> &_.value; <delimiter> <nocache> <random separator="#">_#_#_#_</random> </nocache> </delimiter> </emit> </cache> </rxml> <result>1_2_3_4_5_6_7</result> </test>
ed33482001-03-15Martin Nilsson 
fdf7762001-05-31Martin Nilsson  <!-- ............................................................ --> <comment>Values emit plugin</comment> <test> <rxml><set variable="var.foo">1</set><set variable="var.bar">2</set><emit source="values" from-scope="var"
b9c6c62008-08-07Martin Stjernholm sort="index">&_.index;=&_.value; </emit></rxml>
fdf7762001-05-31Martin Nilsson <result>bar=2 foo=1</result> </test> <test> <add what="rvariable" name="x" value="a,b,c" split="," />
b9c6c62008-08-07Martin Stjernholm <rxml><emit source="values" variable="form.x">&_.value; </emit></rxml>
fdf7762001-05-31Martin Nilsson <result>a b c</result> </test> <test> <rxml><set variable="var.a">aa</set><set variable="var.b">AA</set><emit
b9c6c62008-08-07Martin Stjernholm  source="values" from-scope="var" case="lower">&_.value; </emit></rxml>
fdf7762001-05-31Martin Nilsson <result>aa aa</result> </test> <test> <rxml><set variable="var.a">aa</set><set variable="var.b">AA</set><emit
b9c6c62008-08-07Martin Stjernholm  source="values" from-scope="var" case="upper">&_.value; </emit></rxml>
fdf7762001-05-31Martin Nilsson <result>AA AA</result> </test> <test> <rxml><set variable="var.a"> a </set><set variable="var.b">b </set><emit
b9c6c62008-08-07Martin Stjernholm  source="values" from-scope="var" trimwhites="1">&_.value; </emit></rxml>
fdf7762001-05-31Martin Nilsson <result>a b</result> </test> <test>
b9c6c62008-08-07Martin Stjernholm <rxml><emit source="values" values="a,b,c" split=",">&_.value; </emit></rxml>
fdf7762001-05-31Martin Nilsson <result>a b c</result> </test> <test>
b9c6c62008-08-07Martin Stjernholm <rxml><set variable="var.x">a&#0;b&#0;c</set><emit source="values" values="&var.x;">&var.x;&_.value; </emit></rxml>
fdf7762001-05-31Martin Nilsson <result>a b c</result> </test> <test>
b9c6c62008-08-07Martin Stjernholm <rxml><emit source="values" values="hello" advanced="chars">&_.value; </emit></rxml>
fdf7762001-05-31Martin Nilsson <result>h e l l o</result> </test> <test> <rxml><set variable="var.x">1 2
b9c6c62008-08-07Martin Stjernholm 3</set><emit source="values" values="&var.x;" advanced="lines">&var.x;&_.value; </emit></rxml>
fdf7762001-05-31Martin Nilsson <result>1 2 3</result> </test>
b9c6c62008-08-07Martin Stjernholm 
fdf7762001-05-31Martin Nilsson <test no-strip-ws=""> <rxml><set variable="var.x">This will demon- strate things. What? Hi, ho! Blaha boo</set><emit source="values" values="&var.x;" advanced="words">&var.x;&_.value; </emit></rxml> <result>This will demonstrate things What Hi ho Blaha boo </result> </test> <test>
b9c6c62008-08-07Martin Stjernholm <rxml><emit source="values" values="aa,AA,aA,Aa" split="," case="upper">&_.value; </emit></rxml>
fdf7762001-05-31Martin Nilsson <result>AA AA AA AA</result> </test> <test>
b9c6c62008-08-07Martin Stjernholm <rxml><emit source="values" values="aa,AA,aA,Aa" split="," case="lower">&_.value; </emit></rxml>
fdf7762001-05-31Martin Nilsson <result>aa aa aa aa</result> </test>
b9c6c62008-08-07Martin Stjernholm 
fdf7762001-05-31Martin Nilsson <test no-strip-ws=""> <rxml><emit source="values" values=" a , b,c " split="," trimwhites="1">&_.value; </emit></rxml> <result>a b c </result>
cdece02001-01-29Per Hedbor </test>
5a1b8a2001-03-24Martin Nilsson 
cdece02001-01-29Per Hedbor <!-- ............................................................ --> <comment>Use tests</comment> <test> <rxml><use package="test_rxml_package"/><bä/></rxml> <result>Mu!</result> </test> <test> <rxml><use package="test_rxml_package"/>< x="Boo"/></rxml> <result>Boo!</result> </test> <test> <rxml><use package="test_rxml_package"/><gazonkx/></rxml> <resultat><gazonkx/></resultat> </test> <test> <rxml><use package="test_rxml_package"/><bold>x</bold></rxml> <result><b>x</b></result> </test> <test> <rxml><use package="test_rxml_package"/><italic>y</italic></rxml> <result><italic>y</italic></result> </test> <test> <rxml><use package="test_rxml_package"/>&var.a;</rxml> <result>AA</result> </test> <test> <rxml><use package="test_rxml_package"/>&var.b;.</rxml> <result>.</result> </test> <test>
742c352008-08-05Martin Stjernholm <rxml><if rxml_test="xyz">1</if><use package="test_rxml_package"/><if rxml_test="xyz">2</if><if rxml_test="a">3</if></rxml>
cdece02001-01-29Per Hedbor <glob>[Error (parse): *]2</glob> </test> <test>
742c352008-08-05Martin Stjernholm <rxml><if rxml_test2="abc">1</if><use package="test_rxml_package"/><if rxml_test2="abc">2</if><if rxml_test2="a">3</if></rxml>
cdece02001-01-29Per Hedbor <glob>[Error (parse): *][Error (parse): *][Error (parse): *]</glob> </test> <test> <rxml><use packageinfo="1"/></rxml> <has-value>roxenlogo</has-value> <has-value>test_rxml_package</has-value> <has-value>RXML test package</has-value> </test> <test> <rxml><use package="test_rxml_package" info="1"/></rxml> <has-value not="1">roxenlogo</has-value> <has-value>test_rxml_package</has-value> <has-value>RXML test package</has-value> </test> <comment>Missing test: load package from file</comment>
9dc8ef2001-04-21Martin Nilsson  <!-- ............................................................ --> <comment>RXML help</comment> <test> <rxml><help/></rxml> <glob>*</glob>
cdece02001-01-29Per Hedbor </test>
5a1b8a2001-03-24Martin Nilsson 
cdece02001-01-29Per Hedbor <!-- ............................................................ --> <comment>Number tests</comment> <test> <rxml><number num="3"/></rxml> <result>three</result> </test> <test> <rxml><number type="number" num="3"/></rxml> <result>three</result> </test> <test> <rxml><number type="roman" num="3"/></rxml> <result>III</result> </test> <test>
90f6fa2009-12-04Jonas Wallden <rxml><number type="memory" num="14588"/></rxml>
cdece02001-01-29Per Hedbor <result>14.2 kB</result> </test> <test> <rxml><number num="3" language="sv"/></rxml> <result>tre</result> </test> <test> <rxml><number num="3" language="swe"/></rxml> <result>tre</result> </test> <test> <rxml><number type="ordered" num="3"/></rxml> <result>3rd</result> </test> <test> <rxml><number type="ordered" num="3" language="swe"/></rxml> <result>3:e</result> </test>
5a1b8a2001-03-24Martin Nilsson 
cdece02001-01-29Per Hedbor <!-- ............................................................ --> <comment>Noparse/eval/nooutput tests</comment> <test> <rxml><noparse><roxen/></noparse></rxml> <result><roxen/></result> </test> <test> <rxml><?noparse <roxen/>?></rxml> <result><roxen/></result> </test> <test> <rxml><?cdata <roxen/>?></rxml> <result>&lt;roxen/&gt;</result> </test> <test> <rxml><define variable="var.x">&var.y;</define><set variable="var.y">Q</set><eval>&var.x:none;</eval></rxml> <result>Q</result> </test> <test> <rxml><nooutput><set variable="var.i">x</set>y</nooutput>z&var.i;</rxml> <result>zx</result> </test>
83abb72010-07-12Martin Stjernholm  <test> <rxml> <nooutput><p>foo</p></nooutput> </rxml> <result></result> </test> <test> <rxml> <nooutput> <value type="array"><value>17</value></value> <value type="mapping"/> </nooutput> </rxml> <result></result> </test> <test> <rxml> <nooutput> <p>foo</p> <set variable="var.a">x</set> <value type="array"> <value>17</value> <set variable="var.b">y</set> </value> </nooutput> &var.a;&var.b; </rxml> <result>xy</result> </test>
cdece02001-01-29Per Hedbor 
5a1b8a2001-03-24Martin Nilsson 
cdece02001-01-29Per Hedbor <!-- ............................................................ --> <comment>Strlen tests</comment> <test> <rxml><strlen/></rxml> <result>0</result> </test> <test> <rxml><strlen></strlen></rxml> <result>0</result> </test> <test> <rxml><strlen>ab cd</rxml> <result>5</result>
9057062001-01-30Martin Nilsson </test>
5a1b8a2001-03-24Martin Nilsson 
9057062001-01-30Martin Nilsson <!-- ............................................................ --> <comment>Entity tests</comment> <test>
5bda532001-04-19Martin Nilsson <rxml><set variable="var.x">&amp;</set>&var.x;</rxml>
9057062001-01-30Martin Nilsson <result>&amp;</result> </test> <test> <rxml><set variable="var.x" value="&amp;"/>&amp;&var.x;</rxml> <result>&amp;</result> </test> <test> <rxml><set variable="var.x" value="&amp;"/>&amp;&var.x:none;</rxml> <result>&</result>
654d2c2001-03-23Per Hedbor </test>
a419ec2001-07-20Martin Stjernholm  <test> <rxml><set variable="var.x" type="int">10</set>&var.x;</rxml> <result>10</result> </test> <test> <rxml><set variable="var.x" type="int" value="10"/>&var.x;</rxml> <result>10</result> </test>
80a3902001-09-13Martin Nilsson  <!-- ............................................................ --> <comment>Entity quoting</comment> <!-- Note that these tests a very incomplete --> <test> <rxml><set variable="var.x">&amp;f;&lt;b&gt;</set>&var.x:none;</rxml> <result>&f;<b></result> </test> <test> <rxml><set variable="var.x">&lt;$</set>&var.x:wml;</rxml> <result>&lt;$$</result> </test>
742c352008-08-05Martin Stjernholm <test>
b865532006-01-11Martin Stjernholm <rxml><set variable="var.x">&lt;$%a#å</set><case case="lower">&var.x:wml-url;</case></rxml> <!-- Behavior in 4.0 and earlier - strings with only ISO 8859-1 chars are encoded straight off by the wml-url encoding while wider strings first are UTF-8 encoded. I don't know what the WAP/WML standard says about this. /mast <result>%3c%24%25a%23%e5</result> -->
80a3902001-09-13Martin Nilsson <result>%3c%24%25a%23%c3%a5</result>
72cb2e2001-04-21Martin Nilsson </test>
5a1b8a2001-03-24Martin Nilsson  <!-- ............................................................ -->
654d2c2001-03-23Per Hedbor <comment>Form scope</comment> <test> <rxml>&form.no-such-variable;</rxml> <result></result> </test>
72cb2e2001-04-21Martin Nilsson  <test> <rxml><set variable="form.foo" value="a,b" split=","/>&form.foo;</rxml> <glob>a&#0;b</glob> </test> <test> <rxml><set variable="form.foo" value="x"/>&form.foo;</rxml> <result>x</result> </test>
b4e5152009-04-24Martin Stjernholm  <test> <rxml type="array"> <set variable="form.foo" value="a,b" split=","/> <value type="any">&form.foo;</value> <value type="text/*">&form.foo;</value> <value type="text/html">&form.foo;</value> </rxml> <equal>({({"a", "b"}), "a\0b", "a&#0;b"})</equal> </test>
72cb2e2001-04-21Martin Nilsson  <test> <add what="variable" name="bar" value="q"/> <rxml>&form.bar;</rxml> <result>q</result> </test> <!-- Ensuring id->variables integrity --> <test> <rxml>&form.bar;</rxml> <result></result> </test> <test> <add what="rvariable" name="bar" value="r"/> <rxml>&form.bar;</rxml> <result>r</result> </test> <!-- Ensuring id->real_variables integrity --> <test> <rxml>&form.bar;</rxml> <result></result> </test> <test> <rxml><set variable="form.x" value="y"/>&form.x.1;</rxml> <result>y</result> </test> <test> <add what="rvariable" name="bar" value="s,t" split=","/> <rxml>&form.bar; &form.bar.1; &form.bar.2;</rxml> <result>s&#0;t s t</result> </test> <!-- Should fail <test> <add what="rvariable" name="bar" value="s,t"/> <rxml>&form.bar.2;</rxml> </test> -->
5a1b8a2001-03-24Martin Nilsson  <test> <rxml><insert variables="full" scope="form"/> Checking for backtrace</rxml> <glob>*</glob> </test> <!-- ............................................................ -->
654d2c2001-03-23Per Hedbor <comment>Var scope</comment> <test> <rxml>&var.no-such-variable;</rxml> <result></result> </test>
72cb2e2001-04-21Martin Nilsson  <test> <rxml><set variable="var.foo" value="bork"/>&var.foo;</rxml> <result>bork</result> </test>
5a1b8a2001-03-24Martin Nilsson  <test> <rxml><insert variables="full" scope="var"/> Checking for backtrace</rxml> <glob>*</glob> </test> <!-- ............................................................ -->
654d2c2001-03-23Per Hedbor <comment>Page scope</comment> <test> <rxml>&page.no-such-variable;</rxml> <result></result> </test>
72cb2e2001-04-21Martin Nilsson  <test> <rxml>&page.pathinfo;</rxml> <result></result> </test> <test> <add what="misc" name="path_info" value="blarg"/> <rxml>&page.pathinfo;</rxml> <result>blarg</result> </test> <test>
8a17882001-06-09Martin Nilsson <rxml>&page.realfile;</rxml>
72cb2e2001-04-21Martin Nilsson <result>etc/test/filesystem/index.html</result> </test> <!-- This should probably be initialized also --> <test> <rxml>&page.virtroot;</rxml> <result></result> </test> <test> <rxml>&page.virtfile;</rxml> <result>/index.html</result> </test> <test> <rxml>&page.path;</rxml> <result>/index.html</result> </test> <!-- This should probably be initialized also --> <test> <rxml>&page.query;</rxml> <result></result> </test> <test> <rxml>&page.url;</rxml> <result>/index.html</result> </test> <test> <rxml>&page.last-true;<false/>&page.last-true;</rxml> <result>10</result> </test> <test> <rxml>&page.language;</rxml> <result></result> </test> <test> <rxml>&page.scope;</rxml> <result></result> </test> <test> <rxml><emit source="values" values="a">&page.scope;</emit></rxml> <result>values</result> </test> <test> <rxml>&page.filesize;</rxml> <result>5</result> </test> <test> <rxml>&page.self;</rxml> <result>index.html</result> </test> <test> <rxml>&page.ssl-strength;</rxml> <result>0</result> </test> <test> <rxml>&page.dir;</rxml> <result>/</result> </test> <test> <add what="not_query" value="/hej/och/hopp.html"/> <rxml>&page.dir;</rxml> <result>/hej/och/</result> </test> <test> <rxml>&page.fgcolor;</rxml> <result></result> </test>
1f32b52001-06-18Martin Stjernholm <test> <rxml type="string"> <define name="fgcolor">#000000</define> &page.fgcolor; </rxml>
72cb2e2001-04-21Martin Nilsson  <result>#000000</result> </test> <test> <rxml>&page.bgcolor;</rxml> <result></result> </test>
1f32b52001-06-18Martin Stjernholm <test> <rxml type="string"> <define name="bgcolor">#ffffff</define> &page.bgcolor; </rxml>
72cb2e2001-04-21Martin Nilsson  <result>#ffffff</result> </test> <test> <rxml>&page.theme-bgcolor;</rxml> <result></result> </test>
1f32b52001-06-18Martin Stjernholm <test> <rxml type="string"> <define name="theme_bgcolor">#ffffaa</define> &page.theme-bgcolor; </rxml>
72cb2e2001-04-21Martin Nilsson  <result>#ffffaa</result> </test> <test> <rxml>&page.theme-fgcolor;</rxml> <result></result> </test>
1f32b52001-06-18Martin Stjernholm <test> <rxml type="string"> <define name="theme_fgcolor">#ff8c00</define> &page.theme-fgcolor; </rxml>
72cb2e2001-04-21Martin Nilsson  <result>#ff8c00</result> </test> <test> <rxml>&page.theme-language;</rxml> <result></result> </test>
1f32b52001-06-18Martin Stjernholm <test> <rxml type="string"> <define name="theme_language">swe</define> &page.theme-language; </rxml>
72cb2e2001-04-21Martin Nilsson  <result>swe</result> </test>
dff9342001-05-30Martin Nilsson  <test> <rxml>&page.counter; &page.counter;</rxml> <result>1 2</result> </test> <test> <rxml>&page.counter; &page.counter;</rxml> <result>1 2</result> </test>
72cb2e2001-04-21Martin Nilsson  <test> <rxml><set variable="var.foo" value="borkason"/>&var.foo;</rxml> <result>borkason</result> </test>
5a1b8a2001-03-24Martin Nilsson  <test> <rxml><insert variables="full" scope="page"/> Checking for backtrace</rxml> <glob>*</glob> </test> <!-- ............................................................ -->
654d2c2001-03-23Per Hedbor <comment>Client scope</comment> <test> <rxml>&client.no-such-variable;</rxml> <result></result> </test>
9dc8ef2001-04-21Martin Nilsson  <test> <rxml><set variable="client.foo" value="x"/>&client.foo;</rxml> <result>x</result> </test>
5a1b8a2001-03-24Martin Nilsson  <test> <rxml><insert variables="full" scope="client"/> Checking for backtrace</rxml> <glob>*</glob> </test> <test> <rxml>&client.fullname;</rxml> <result></result> </test> <test> <rxml>&client.Fullname;</rxml> <result></result> </test> <test> <rxml>&client.accept-language;</rxml> <result></result> </test> <test> <rxml>&client.accept-languages;</rxml> <result></result> </test>
c91fb72008-11-18Martin Stjernholm  <test> <rxml type="array">&client.accept-languages;</rxml> <equal>({})</equal> </test> <test> <rxml type="any">&client.accept-languages;</rxml> <equal>RXML.nil</equal> </test>
5a1b8a2001-03-24Martin Nilsson 
3dc9422001-03-24Martin Nilsson <test>
6189c32002-05-23Martin Stjernholm <rxml>&client.authenticated;</rxml>
5a1b8a2001-03-24Martin Nilsson <result></result> </test> <test>
4910742008-11-01Martin Stjernholm <rxml>&client.host;</rxml>
5a1b8a2001-03-24Martin Nilsson <regexp>^(127\.0\.0\.1|localhost)$</regexp> </test> <test> <rxml>&client.ip;</rxml> <result>127.0.0.1</result> </test> <test> <rxml>&client.javascript;</rxml> <result></result> </test> <test>
dd74882001-08-17Martin Nilsson <rxml>&client.language;</rxml>
5a1b8a2001-03-24Martin Nilsson <result>sv</result> </test> <test>
dd74882001-08-17Martin Nilsson <rxml>&client.languages;</rxml>
5a1b8a2001-03-24Martin Nilsson <result>sv, en, bräk</result> </test> <test>
ca962a2001-08-17Martin Nilsson <rxml>&client.name;</rxml>
5a1b8a2001-03-24Martin Nilsson <result>RoxenTest</result> </test> <test> <rxml>&client.password;</rxml> <result></result> </test> <test> <rxml>&client.referrer;</rxml> <result></result> </test> <test> <rxml>&client.tm;</rxml> <result>&lt;TM&gt;</result> </test> <test> <rxml>&client.user;</rxml> <result></result> </test> <!-- ............................................................ -->
654d2c2001-03-23Per Hedbor <comment>Cookie scope</comment> <test> <rxml>&cookie.no-such-cookie;</rxml> <result></result>
5a1b8a2001-03-24Martin Nilsson </test>
9dc8ef2001-04-21Martin Nilsson  <test> <rxml><set variable="cookie.foo" value="x"/>&cookie.foo;</rxml> <result>x</result> </test>
5a1b8a2001-03-24Martin Nilsson  <test> <rxml><insert variables="full" scope="cookie"/> Checking for backtrace</rxml> <glob>*</glob> </test> <!-- ............................................................ --> <comment>Roxen scope</comment> <test> <rxml>&roxen.no-such-variable;</rxml> <result></result> </test>
9dc8ef2001-04-21Martin Nilsson  <!-- Should fail <test> <rxml><set variable="roxen.foo" value="x"/>&roxen.foo;</rxml> <result></result> </test> -->
5a1b8a2001-03-24Martin Nilsson  <test> <rxml><insert variables="full" scope="roxen"/> Checking for backtrace</rxml> <glob>*</glob> </test> <test>
7560ae2001-04-18Martin Nilsson <rxml>&roxen.domain;</rxml>
5a1b8a2001-03-24Martin Nilsson <glob>?*</glob> </test> <test> <rxml>&roxen.hits;</rxml> <regexp>[0-9]+</regexp> </test> <test> <rxml>&roxen.hits-per-minute;</rxml> <regexp>[0-9]+</regexp> </test> <test> <rxml>&roxen.locale;</rxml> <result>eng</result> </test> <test> <rxml>&roxen.path;</rxml> <result></result> </test> <test>
c745112014-10-21Henrik Grubbström (Grubba) <rxml>&roxen.pike-version;</rxml>
5a1b8a2001-03-24Martin Nilsson <regexp>Pike v8.[0-9] release [0-9]+</regexp> </test> <test> <rxml>&roxen.sent;</rxml> <regexp>[0-9]+</regexp> </test> <test> <rxml>&roxen.sent-kbit-per-second;</rxml> <regexp>[0-9]+\.[0-9]+</regexp> </test> <test> <rxml>&roxen.sent-mb;</rxml> <regexp>[0-9]+\.[0-9]+</regexp> </test> <test> <rxml>&roxen.sent-per-minute;</rxml> <regexp>[0-9]+</regexp> </test> <test>
8416992001-08-17Martin Nilsson <rxml>&roxen.server;</rxml>
5a1b8a2001-03-24Martin Nilsson <glob>http://*:17369/</glob> </test> <test>
5bda532001-04-19Martin Nilsson <rxml>&roxen.ssl-strength;</rxml>
5a1b8a2001-03-24Martin Nilsson <regexp>0|40|128|168</regexp> </test> <test> <rxml>&roxen.time;</rxml> <regexp>[0-9]+</regexp> </test>
a868532001-08-29Martin Nilsson  <test> <rxml>&roxen.time; <testsleep time="3"/>&roxen.time;</rxml> <pike> array x=array_sscanf(res, "%d %d"); if(sizeof(x)!=2) return "\""+res+"\" doesn't match \"%d %d\"."; if(x[0]==x[1]) return "First time equals second."; return 0; </pike> </test>
5a1b8a2001-03-24Martin Nilsson  <test> <rxml>&roxen.uptime;</rxml> <regexp>[0-9]+</regexp> </test> <test> <rxml>&roxen.uptime-days;</rxml> <regexp>[0-9]+</regexp> </test> <test> <rxml>&roxen.uptime-hours;</rxml> <regexp>[0-9]+</regexp> </test> <test> <rxml>&roxen.uptime-minutes;</rxml> <regexp>[0-9]+</regexp> </test> <test>
5c32002014-10-21Henrik Grubbström (Grubba) <rxml>&roxen.version;</rxml>
5a1b8a2001-03-24Martin Nilsson <regexp>Roxen/6\.0\.[0-9]+</regexp>
9dc8ef2001-04-21Martin Nilsson </test> <test> <rxml>&roxen.unique-id;</rxml> <regexp>[0-9A-F]+</regexp>
a868532001-08-29Martin Nilsson </test> <!-- ............................................................ --> <comment>Array variables</comment> <test> <rxml><if variable="var.foo">1</if><set variable="var.foo" split="," >a,b</set><if variable="var.foo">2</if></rxml> <result>2</result> </test> <test> <rxml><set variable="var.foo" split=",">hej,san</set><if variable="var.foo = hej" >1</if><if variable="var.foo = san">2</if><if variable="var.foo = sa">3</if></rxml> <result>12</result> </test> <test> <rxml><set variable="var.foo" split=",">hej,san</set><if variable="var.foo = h*" >1</if><if variable="var.foo = t*">2</if><if variable="var.foo = s??">3</if></rxml> <result>13</result>
8a84d62008-11-01Martin Stjernholm </test> <test no-strip-ws=""> <rxml type="text/*"> <value type="text/*"> a</value> <value> b</value> c <value>d</value> e </rxml> <result> a b c d e </result> </test> <test no-strip-ws=""> <rxml type="string"> <value type="text/*"> a</value> <value> b</value> c <value>d</value> <value/> e </rxml> <result> abcde</result> </test> <test> <rxml type="array"> <set variable="var.x" split=",">1,2</set> &var.x; </rxml> <equal>({"1", "2"})</equal> </test> <test> <rxml type="array"> <set variable="var.x" split=",">1,2</set> <value>&var.x;</value> </rxml> <equal>({({"1", "2"})})</equal> </test> <test> <rxml type="array"> <set variable="var.x" split=",">1,2</set> <value type="array">&var.x;</value> </rxml> <equal>({({"1", "2"})})</equal> </test> <test> <rxml type="any"> <set variable="var.x" split=",">1,2</set> <range from="2" to="-2"> abc &var.x; <range variable="var.x"/> </range> </rxml> <equal>({"1", "2", "1"})</equal> </test> <test> <rxml type="any"> <set variable="var.x" split=",">1,2</set> <range from="2" to="-2"> abc <value>&var.x;</value> <range variable="var.x"/> </range> </rxml> <equal>({({"1", "2"}), "1"})</equal> </test> <test> <rxml type="any"> <value type="array"> <value>foo</value> &roxen.no-such-variable; <value>bar</value> &roxen.locale; <value type="int">17</value> <value/> </value> </rxml> <equal>({"foo", "bar", "eng", 17, 0})</equal> </test> <test> <rxml type="array"> abc def <value>foo</value> <value type="int">17</value> <value type="float">17</value> <value type="array">0</value> </rxml> <equal>({"abc\ndef", "foo", 17, 17.0, ({"0"})})</equal> </test> <test> <rxml type="any"> <set variable="var.x" type="array"> <emit source="TESTER" test="4"> &_.a; </emit> </set> &var.x; </rxml> <equal>({"1", "2", "3"})</equal> </test> <test> <rxml type="array"> <emit source="TESTER" test="4"> <value type="int">&_.a;</value> </emit> </rxml> <equal>({1, 2, 3})</equal> </test> <test> <rxml type="array"> <emit source="TESTER" test="4"> &_.a; &_.b; &_.c; </emit> </rxml> <equal>({"1", "aa", "ca", "2", "ba", "cb", "3", "ab", "ba"})</equal> </test> <test> <rxml type="array"> <emit source="TESTER" test="4"> <value type="string"> &_.a; &_.b; </value> </emit> </rxml> <equal>({"1aa", "2ba", "3ab"})</equal> </test> <test> <rxml type="array"> <emit source="TESTER" test="4"> <value type="array"> &_.a; &_.b; </value> </emit> </rxml> <equal>({({"1", "aa"}), ({"2", "ba"}), ({"3", "ab"})})</equal> </test> <test> <rxml type="array"> <emit source="TESTER" test="4"> <if variable="_.a &gt; 1">&gt; <value type="text/*"> &_.a; &_.b; </value> </if> </emit> </rxml> <equal>({" 2 ba ", " 3 ab "})</equal> </test> <!-- ............................................................ --> <comment>Mapping variables</comment> <test> <rxml type="mapping"> <value index="1">a</value> <value index="2.3">b</value> <value index="3s">c</value> </rxml> <equal>(["1": "a", "2.3": "b", "3s": "c"])</equal> </test> <test> <rxml type="any"> <value type="mapping"> <value index="1">a</value> <value index="2.3">b</value> <value index="3s">c</value> </value> </rxml> <equal>(["1": "a", "2.3": "b", "3s": "c"])</equal> </test> <test> <rxml> <set variable="var.x" type="mapping"> <value type="mapping"> <value index="1">a</value> <value index="2.3">b</value> <value index="3s">c</value> </value> </set> </rxml> <glob>[Error (parse): "index" attribute required in mapping context.]</glob> </test> <test> <rxml type="mapping"> <value index="x" type="mapping"> <value index="1">a</value> <value index="2.3">b</value> <value index="3s">c</value> </value> </rxml> <equal>(["x": (["1": "a", "2.3": "b", "3s": "c"])])</equal> </test> <test> <rxml> <set variable="var.x" type="mapping"> <emit source="TESTER" test="4"> <if variable="_.a &gt; 1">&gt; <value index="&_.a;">&_.a;&_.b;</value> </if> </emit> </set> <emit source="values" variable="var.x" sort="value"> &_.index;: &_.value;<br/> </emit> </rxml> <result> 3: ab<br/> 2: ba<br/> </result>
7614392009-07-02Martin Stjernholm </test>
33edf22009-07-13Martin Stjernholm <!-- ............................................................ -->
7614392009-07-02Martin Stjernholm <comment>Missing nonsequential values tests</comment> <test> <rxml type="any"> <test-args req-string="x" req-int="1" opt-string="&var.x;" opt-int="&var.x;" opt-float="&var.x;"/>&var.x;&var.x;&var.x; </rxml> <equal>([ "req-string": "x", "req-int": 1, "opt-string": "", ])</equal> </test> <test> <rxml type="any"> <set variable="var.args" type="text/*"> req-string="x" req-int="1" opt-string="&var.x;" opt-int="&var.x;" opt-float="&var.x;" </set> <test-args ::="&var.args;"/>&var.args; </rxml> <equal>([ "req-string": "x", "req-int": 1, "opt-string": "", ])</equal> </test> <test> <rxml type="any"> <test-args req-string="x" req-int="1" opt-string="" opt-int="" opt-float=""/> </rxml> <equal>([ "req-string": "x", "req-int": 1, "opt-string": "", ])</equal> </test> <test> <rxml type="any"> <set variable="var.args" type="text/*"> req-string="x" req-int="1" opt-string="" opt-int="" opt-float="" </set> <test-args ::="&var.args;"/>&var.args; </rxml> <equal>([ "req-string": "x", "req-int": 1, "opt-string": "", ])</equal> </test> <test> <rxml> <test-args req-string="" req-int=""/> </rxml> <glob>[Error (parse): No value given for nonsequential type int*]</glob> </test> <test> <rxml> <set variable="var.args" type="text/*"> req-string="" req-int="" </set> <test-args ::="&var.args;"/>&var.args; </rxml> <glob>[Error (parse): No value given for nonsequential type int*]</glob>
33edf22009-07-13Martin Stjernholm </test> <test> <rxml type="any"> <test-required-content> <value type="int">17</value> </test-required-content> </rxml> <equal>17</equal> </test> <test> <rxml> <test-required-content/> </rxml> <glob>[Error (parse): Missing value for nonsequential content*]</glob> </test> <test> <rxml> <test-required-content> </test-required-content> </rxml> <glob>[Error (parse): Missing value for nonsequential content*]</glob>