You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

112 lines
3.7 KiB
Plaintext

Bodiless math{~n}
============={~n}
{@math key="7" method="add" operand="4" /}{~n}
{@math key=number_7 method="add" operand="4" /}{~n}
{@math key=string_7 method="add" operand="4" /}{~n}
{@math key=string_cat method="add" operand="4" /}{~n}
{@math key=string_cat method="add" operand="foo" /}{~n}
Math with body: dot reference{~n}
============================={~n}
{@math key="7" method="add" operand="4"}
{.}{~n}
{/math}
Math with body: eq literal{~n}
=========================={~n}
{@math key="7" method="add" operand="4"}
{@eq value=11}math result is 11{:else}math result is not 11{/eq}{~n}
{/math}
Math with body: eq string{~n}
========================={~n}
{@math key="7" method="add" operand="4"}
{@eq value="11"}math result is "11"{:else}math result is not "11"{/eq}{~n}
{/math}
Math with body: eq else block{~n}
============================={~n}
{@math key="7" method="add" operand="4"}
{@eq value=12}math result is 12{:else}math result is not 12{/eq}{~n}
{/math}
Math with body: standalone eq{~n}
============================={~n}
{@math key="7" method="add" operand="4"}
{@eq key=12 value=12}12 is 12{:else}12 is not 12{/eq}{~n}
{/math}
Math with body: standalone else block{~n}
====================================={~n}
{@math key="7" method="add" operand="4"}
{@eq key=11 value=12}11 is 12{:else}11 is not 12{/eq}{~n}
{/math}
Math with body: early termination{~n}
============================={~n}
{@math key="7" method="add" operand="4"}
{@eq value=11}math result is 11{~n}{:else}math result is not 11{~n}{/eq}
{@eq value=11}math result is 11{~n}{:else}math result is not 11{~n}{/eq}
{/math}
Math with body: early termination else block{~n}
============================================{~n}
{@math key="7" method="add" operand="4"}
{@eq value=12}math result is 12{~n}{:else}math result is not 12{~n}{/eq}
{@eq value=11}math result is 11{~n}{:else}math result is not 11{~n}{/eq}
{@eq value=12}math result is 12{~n}{:else}math result is not 12{~n}{/eq}
{/math}
Math with body: any{~n}
==================={~n}
{@math key="7" method="add" operand="4"}
{@eq value=10}math result is 10{~n}{:else}math result is not 10{~n}{/eq}
{@eq value=11}math result is 11{~n}{:else}math result is not 11{~n}{/eq}
{@eq value=12}math result is 12{~n}{:else}math result is not 12{~n}{/eq}
{@any}We found the value{~n}{/any}
{@none}We did not find the value{~n}{/none}
{/math}
Math with body: none{~n}
===================={~n}
{@math key="7" method="add" operand="4"}
{@eq value=10}math result is 10{~n}{:else}math result is not 10{~n}{/eq}
{@eq value=12}math result is 12{~n}{:else}math result is not 12{~n}{/eq}
{@any}We found the value{~n}{/any}
{@none}We did not find the value{~n}{/none}
{/math}
Math where method is a reference{~n}
================================{~n}
{@math key="7" method=add_operation operand="4" /}{~n}
Math where method is a template{~n}
==============================={~n}
{@math key="7" method="{a_operation}dd" operand="4" /}{~n}
Math where key is a template{~n}
============================{~n}
{@math key="{string_7}1" method="add" operand="4" /}{~n}
Math where method is absent{~n}
============================{~n}
{@math key="7" operand="4" /}{~n}
Math where method is missing{~n}
============================{~n}
{@math key="7" method=foobar operand="4" /}{~n}
Math with unknown method{~n}
========================{~n}
{@math key="7" method="twirl" operand="4" /}{~n}
Math with body where method is absent{~n}
===================================={~n}
{@math key="7" operand="4"}
{@eq value=12}math result is 12{~n}{:else}math result is not 12{~n}{/eq}
{@any}We found the value{~n}{/any}
{@none}We did not find the value{~n}{/none}
plain text not inside a tag{~n}
{/math}