diff --git a/addons/base/static/qweb/qweb-test-attributes.xml b/addons/base/static/qweb/qweb-test-attributes.xml
new file mode 100644
index 00000000000..91317d5194b
--- /dev/null
+++ b/addons/base/static/qweb/qweb-test-attributes.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/base/static/qweb/qweb-test.js.html b/addons/base/static/qweb/qweb-test.js.html
index 678006f38af..a07c6380d2c 100644
--- a/addons/base/static/qweb/qweb-test.js.html
+++ b/addons/base/static/qweb/qweb-test.js.html
@@ -130,6 +130,35 @@
equals(render('lower-or-equal-js', {}), 'ok',
"Lower or Equal, JS operator");
});
+
+ module("Attributes manipulation", {
+ setup: function () {
+ QWeb.add_template('qweb-test-attributes.xml');
+ },
+ teardown: function () {
+ QWeb.templates = [];
+ QWeb.tag = {};
+ QWeb.att = {};
+ }
+ });
+ test('Fixed-name attributes', function () {
+ equals(render('fixed-literal', {}), '
',
+ "Fixed name and literal attribute value");
+ equals(render('fixed-variable', {value: 'ok'}), '',
+ "Fixed name and variable attribute value");
+ });
+ test('Tuple-based attributes', function () {
+ equals(render('tuple-literal', {}), '',
+ "Tuple-based literal attributes");
+ equals(render('tuple-variable', {att: ['foo', 'bar']}), '',
+ "Tuple-based variable attributes");
+ });
+ test('Fixed name, formatted value attributes', function () {
+ equals(render('format-literal', {}), '',
+ "Literal format");
+ equals(render('format-value', {value:'a'}), '',
+ "Valued format");
+ });
});