diff options
| author | Vincent Schippefilt <vsc@odoo.com> | 2018-11-12 15:48:16 +0000 |
|---|---|---|
| committer | Vincent Schippefilt <vsc@odoo.com> | 2018-11-13 08:14:07 +0000 |
| commit | fe7fd9c0d776d0e3819a0e36cc5f00727e8628ea (patch) | |
| tree | 7af6af2d42922fbdf05eacf72554207e337630ee /addons/web/static/tests/qweb_tests.js | |
| parent | 4f9a0cb4fcdfa9fee66c042593f4d411dd0e192f (diff) | |
[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
Diffstat (limited to 'addons/web/static/tests/qweb_tests.js')
| -rw-r--r-- | addons/web/static/tests/qweb_tests.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/web/static/tests/qweb_tests.js b/addons/web/static/tests/qweb_tests.js index 6e40dd1b1cb..b31c604b4bf 100644 --- a/addons/web/static/tests/qweb_tests.js +++ b/addons/web/static/tests/qweb_tests.js @@ -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'); |
