JetCore/tests/testjet.jet
2024-11-19 16:44:15 -08:00

64 lines
1.9 KiB
Plaintext
Executable File

#!/home/barant/Development/JetCore/jet-2.0
<jet cgi="true" name1="localname" filterblanklines="true" trimlines="true">
<header name="Content-Type" value="text/html" />
<comment>This is a comment and should not show up in the output.</comment>
<html>
---
<set name="modified1" value="ABCD" />
$[modified1]
<set name="tohex" value="TOHEX" />
$[modified1]
---
$[nonexistant]
$[%HOME]
<set name="ix" value="1" />
<set name="theexpr" expr="SUBSTRING('abcdefg', 5 - 4, 20 - 17)" />
<set name="addition" expr="5+3" />
<set name="subtraction" expr="5-3" />
<set name="multiplication" expr="5*3" />
<set name="division" expr="5/3" />
<set name="divisor" value="8" />
<set name="nested" expr="(2*(4+4)/$[divisor])*32" />
$[$nested]
<set name="numbers">0123456789</set>
<set name="lefty" expr="LEFT($[numbers],5)" />
lefty=[$[lefty]]
substring('abcdefg', 1, 3)=[$[theexpr]]
5+3=($[addition])
5-3($[subtraction])
5*3($[multiplication])
5/3($[division])
<set name="varname$[ix]" value="vardata" scope="global" />
<set name="noeval" eval="no">this is the value store in #[name].</set>
<set name="thename" eval="yes">this is the value store in #[name].</set>
<set name="newname" scope="global">another container value</set>
<include file="./testinclude.jet" />
include: $[include]
>>>$[noeval]<<<
>>>$[thename]<<<
<set name="iz" value="data" />
<set name="ix1" value="1" />
<set name="test$[ix$[ix1]]$[iz]" value="0123456789" />
$[test$[ix$[ix1]]$[iz]]
<if value1="X" value2="Y" type="ne">
789
<if expr="3>1">
123
<else>
456
</if>
</if>
<for name="ix" start="1" end="5" step="1">
-->#[ix]<--
</for>
<call status="rc" pgm="/usr/bin/ls" arg1="-al" name="ls" />
$[rc]
$[ls]
<read file="../compile" name="file" />
$[filex]
<whiledir path="." filename="file" fullpath="fullpath" filenamenoextension="noext" sort="true">
$[file] $[fullpath] $[noext]
</whiledir>
</html>
</jet>