[FIX] web: fix qweb test that fails on windows

When the qunit tests runs they are expecting the new line to be the character 10,
but in windows the new line is 10+13.
The test has been updated to ignore the character 13.

closes odoo/odoo#28599
This commit is contained in:
Vincent Schippefilt
2018-11-13 08:14:07 +00:00
parent 4f9a0cb4fc
commit fe7fd9c0d7
+2 -1
View File
@@ -49,9 +49,10 @@ function loadTest(assert, template, context) {
var args = params ? JSON.parse(params.textContent) : (context ? _.clone(context) : {});
var results = doc.querySelector('result#' + template);
assert.equal(
trim(qweb.render(template, args)),
trim(results.textContent),
trim(results.textContent.replace(new RegExp(String.fromCharCode(13), 'g'), '')),
template);
} catch (error) {
assert.notOk(error.stack || error, 'Rendering error');