summaryrefslogtreecommitdiff
path: root/addons/web/static/lib/qweb/qweb-test-set.xml
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
commit3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch)
treea44932296ef4a9b71d5f010906253d8c53727726 /addons/web/static/lib/qweb/qweb-test-set.xml
parent0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff)
initial commit 2
Diffstat (limited to 'addons/web/static/lib/qweb/qweb-test-set.xml')
-rw-r--r--addons/web/static/lib/qweb/qweb-test-set.xml53
1 files changed, 53 insertions, 0 deletions
diff --git a/addons/web/static/lib/qweb/qweb-test-set.xml b/addons/web/static/lib/qweb/qweb-test-set.xml
new file mode 100644
index 00000000..945fd4a2
--- /dev/null
+++ b/addons/web/static/lib/qweb/qweb-test-set.xml
@@ -0,0 +1,53 @@
+<templates>
+ <t t-name="set-from-attribute-literal">
+ <t t-set="value" t-value="'ok'"/>
+ <t t-esc="value"/>
+ </t>
+ <result id="set-from-attribute-literal">
+ ok
+ </result>
+
+ <t t-name="set-from-body-literal">
+ <t t-set="value">ok</t>
+ <t t-esc="value"/>
+ </t>
+ <result id="set-from-body-literal">
+ ok
+ </result>
+
+ <t t-name="set-from-attribute-lookup">
+ <t t-set="stuff" t-value="value"/>
+ <t t-esc="stuff"/>
+ </t>
+ <params id="set-from-attribute-lookup">
+ {"value": "ok"}
+ </params>
+ <result id="set-from-attribute-lookup">
+ ok
+ </result>
+
+ <t t-name="set-from-body-lookup">
+ <t t-set="stuff">
+ <t t-esc="value"/>
+ </t>
+ <t t-esc="stuff"/>
+ </t>
+ <params id="set-from-body-lookup">
+ {"value": "ok"}
+ </params>
+ <result id="set-from-body-lookup">
+ ok
+ </result>
+
+ <t t-name="set-empty-body">
+ <t t-set="stuff"/>
+ <t t-esc="stuff"/>
+ </t>
+ <result id="set-empty-body"/>
+
+ <t t-name="t-value-priority">
+ <t t-set="value" t-value="1">2</t>
+ <t t-esc="value"/>
+ </t>
+ <result id="t-value-priority">1</result>
+</templates>