Roxen.git/
server/
etc/
test/
tests/
rxml/
RoxenTest_BaseRXML.xml
Branch:
Tag:
Non-build tags
All tags
No tags
2001-04-21
2001-04-21 20:22:21 by Martin Nilsson <mani@lysator.liu.se>
9dc8ef92092899f03f1891dcd19cefb4a001a1da (
71
lines) (+
69
/-
2
)
[
Show
|
Annotate
]
Branch:
5.2
Added some more tests
Rev: server/etc/test/tests/rxml/RoxenTest_BaseRXML.xml:1.14
775:
<result></result> </test>
+
<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>
+
</test>
+
<comment>Missing test: if date</comment> <comment>Missing test: if time</comment> <comment>Missing test: if user</comment>
794:
<comment>Missing test: if supports</comment> <comment>Missing test: if clientvar</comment> <comment>Missing test: <cond></comment>
-
<comment>Missing test: path emit plugin</comment>
+
<!-- ............................................................ -->
-
+
<comment>Path emit plugin</comment>
+
<test>
+
<rxml><emit source="path" path="/a/b/c">&_.name; &_.path;|</emit></rxml>
+
<result> /|a /a|b /a/b|c /a/b/c|</result>
+
</test>
+
+
<test>
+
<rxml><emit source="path" path="/a/b/c" trim="/c">&_.name; &_.path;|</emit></rxml>
+
<result> /|a /a|b /a/b|</result>
+
</test>
+
+
<test>
+
<rxml><emit source="path" path="/a/b/c" skip="1">&_.name; &_.path;|</emit></rxml>
+
<result>a /a|b /a/b|c /a/b/c|</result>
+
</test>
+
+
<test>
+
<rxml><emit source="path" path="/a/b/c" skip-end="1">&_.name; &_.path;|</emit></rxml>
+
<result> /|a /a|b /a/b|</result>
+
</test>
+
+
+
<!-- ............................................................ -->
<comment>Emit tests</comment> <test> <rxml><emit source="values" values="1,2,3" split=",">&_.value;:</emit></rxml>
1337:
<comment>Missing test: load package from file</comment>
-
<comment>
Missing
test
:
<help>
tag
</
comment
>
+
<
!-- ............................................................ -->
+
<
comment>
RXML
help</comment>
+
<
test
>
+
<
rxml><
help
/
></
rxml
>
+
<glob>*</glob>
+
</test>
<!-- ............................................................ -->
1703:
</test> <test>
+
<rxml><set variable="client.foo" value="x"/>&client.foo;</rxml>
+
<result>x</result>
+
</test>
+
+
<test>
<rxml><insert variables="full" scope="client"/> Checking for backtrace</rxml> <glob>*</glob> </test>
1791:
</test> <test>
+
<rxml><set variable="cookie.foo" value="x"/>&cookie.foo;</rxml>
+
<result>x</result>
+
</test>
+
+
<test>
<rxml><insert variables="full" scope="cookie"/> Checking for backtrace</rxml> <glob>*</glob> </test>
1803:
<result></result> </test>
+
<!-- Should fail
<test>
-
+
<rxml><set variable="roxen.foo" value="x"/>&roxen.foo;</rxml>
+
<result></result>
+
</test>
+
-->
+
+
<test>
<rxml><insert variables="full" scope="roxen"/> Checking for backtrace</rxml> <glob>*</glob> </test>
1897:
<rxml>&roxen.version;</rxml> <regexp>Roxen/2\.2\.[0-9]+</regexp> </test>
+
+
<test>
+
<rxml>&roxen.unique-id;</rxml>
+
<regexp>[0-9A-F]+</regexp>
+
</test>