summaryrefslogtreecommitdiff
path: root/addons/web/static/lib/qweb/qweb-test-conditionals.xml
diff options
context:
space:
mode:
authorAntony Lesuisse <al@openerp.com>2011-09-05 13:03:09 +0200
committerAntony Lesuisse <al@openerp.com>2011-09-05 13:03:09 +0200
commitbedfc48dcfb066e61209337235e339975dd093d0 (patch)
treefd1bab7b9f21380f1aa3ca7675018f13b4d9e652 /addons/web/static/lib/qweb/qweb-test-conditionals.xml
parent272424894a91aa136952cf88ef206afab5b5505c (diff)
rename base into web part1
bzr revid: al@openerp.com-20110905110309-egx167t1ni1fzho1
Diffstat (limited to 'addons/web/static/lib/qweb/qweb-test-conditionals.xml')
-rw-r--r--addons/web/static/lib/qweb/qweb-test-conditionals.xml59
1 files changed, 59 insertions, 0 deletions
diff --git a/addons/web/static/lib/qweb/qweb-test-conditionals.xml b/addons/web/static/lib/qweb/qweb-test-conditionals.xml
new file mode 100644
index 00000000000..43d16578bfc
--- /dev/null
+++ b/addons/web/static/lib/qweb/qweb-test-conditionals.xml
@@ -0,0 +1,59 @@
+<templates>
+ <t t-name="literal-conditional">
+ <t t-if="true">ok</t>
+ </t>
+ <t t-name="boolean-value-conditional">
+ <t t-if="value">ok</t>
+ </t>
+ <t t-name="boolean-value-conditional-false">
+ <t t-if="value">fail</t>
+ </t>
+
+ <t t-name="negify">
+ <t t-if="!false">ok</t>
+ </t>
+ <t t-name="equality">
+ <t t-if="1 == 1">ok</t>
+ </t>
+ <t t-name="difference">
+ <t t-if="1 != 2">ok</t>
+ </t>
+ <t t-name="and">
+ <t t-if="true and true">ok</t>
+ </t>
+ <t t-name="and-js">
+ <t t-if="true &amp;&amp; true">ok</t>
+ </t>
+ <t t-name="or">
+ <t t-if="false or true">ok</t>
+ </t>
+ <t t-name="or-js">
+ <t t-if="false || true">ok</t>
+ </t>
+
+ <t t-name="greater">
+ <t t-if="2 gt 1">ok</t>
+ </t>
+ <t t-name="greater-js">
+ <t t-if="2 &gt; 1">ok</t>
+ </t>
+ <t t-name="lower">
+ <t t-if="1 lt 2">ok</t>
+ </t>
+ <t t-name="lower-js">
+ <t t-if="1 &lt; 2">ok</t>
+ </t>
+
+ <t t-name="greater-or-equal">
+ <t t-if="2 gte 1">o</t><t t-if="2 gte 2">k</t>
+ </t>
+ <t t-name="greater-or-equal-js">
+ <t t-if="2 &gt;= 1">o</t><t t-if="2 &gt;= 2">k</t>
+ </t>
+ <t t-name="lower-or-equal">
+ <t t-if="1 lte 2">o</t><t t-if="2 lte 2">k</t>
+ </t>
+ <t t-name="lower-or-equal-js">
+ <t t-if="1 &lt;= 2">o</t><t t-if="2 &lt;= 2">k</t>
+ </t>
+</templates>