[ADD] some more escf tests
bzr revid: xmo@openerp.com-20110310085836-prkhe118n27n1xcz
This commit is contained in:
@@ -33,6 +33,12 @@
|
||||
});
|
||||
test("Formatted escaped data output", function () {
|
||||
equals("ok", render('escf-noformat-literal', {}), "Render a literal string");
|
||||
equals("ok", render('escf-simpleformat-variable', {value: 'ok'}),
|
||||
"Only render an interpolated variable");
|
||||
equals("[ok]", render('escf-format-variable', {value: 'ok'}),
|
||||
"Actually formatted variable");
|
||||
equals('[<ok>]', render('escf-format-variable-with-escapes', {value: '<ok>'}),
|
||||
"Render a formatted string with data to escape");
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<templates>
|
||||
<!-- esc -->
|
||||
<t t-name="esc-literal">
|
||||
<t t-esc="'ok'"/>
|
||||
</t>
|
||||
@@ -9,8 +10,17 @@
|
||||
<t t-esc="ok"/>
|
||||
</t>
|
||||
|
||||
|
||||
<!-- escf -->
|
||||
<t t-name="escf-noformat-literal">
|
||||
<t t-escf="ok"/>
|
||||
</t>
|
||||
<t t-name="escf-simpleformat-variable">
|
||||
<t t-escf="#{value}"/>
|
||||
</t>
|
||||
<t t-name="escf-format-variable">
|
||||
<t t-escf="[#{value}]"/>
|
||||
</t>
|
||||
<t t-name="escf-format-variable-with-escapes">
|
||||
<t t-escf="[#{value}]"/>
|
||||
</t>
|
||||
</templates>
|
||||
|
||||
Reference in New Issue
Block a user