summaryrefslogtreecommitdiff
path: root/addons/web/static/lib/py.js/test/parser.js
diff options
context:
space:
mode:
authorXavier Morel <xmo@openerp.com>2012-03-01 12:18:07 +0100
committerXavier Morel <xmo@openerp.com>2012-03-01 12:18:07 +0100
commit4a6776d7a11f6c2004358c614411bd662dca2ad6 (patch)
treed5a7ffd27e3a2b15b5532d123e434ab20f29e221 /addons/web/static/lib/py.js/test/parser.js
parente1ef7c7d88c830024376307cb165b01105fb1b60 (diff)
[FIX] update py.js, fixes tokenization of expressions with trailing whitespace
bzr revid: xmo@openerp.com-20120301111807-f3lthxw4zkytk42f
Diffstat (limited to 'addons/web/static/lib/py.js/test/parser.js')
-rw-r--r--addons/web/static/lib/py.js/test/parser.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/addons/web/static/lib/py.js/test/parser.js b/addons/web/static/lib/py.js/test/parser.js
index 16f333f78ac..ca74d2bebc8 100644
--- a/addons/web/static/lib/py.js/test/parser.js
+++ b/addons/web/static/lib/py.js/test/parser.js
@@ -84,6 +84,11 @@ describe('Tokenizer', function () {
expect(toks).to.have.tokens(1);
expect(toks[0]).to.be.constant('False');
});
+ it('does not fuck up on trailing spaces', function () {
+ var toks = py.tokenize('None ');
+ expect(toks).to.have.tokens(1);
+ expect(toks[0]).to.be.constant('None');
+ });
});
describe('collections', function () {
it('tokenizes opening and closing symbols', function () {