summaryrefslogtreecommitdiffstats
path: root/spec/tokenizer.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/tokenizer.js')
-rw-r--r--spec/tokenizer.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/tokenizer.js b/spec/tokenizer.js
index dc077ce..428804e 100644
--- a/spec/tokenizer.js
+++ b/spec/tokenizer.js
@@ -146,6 +146,11 @@ describe('Tokenizer', function() {
shouldMatchTokens(result, ['OPEN', 'ID', 'SEP', 'ID', 'CLOSE', 'OPEN', 'ID', 'SEP', 'ID', 'CLOSE']);
});
+ it('allows escaped literals in []', function() {
+ var result = tokenize('{{foo.[bar\\]]}}');
+ shouldMatchTokens(result, ['OPEN', 'ID', 'SEP', 'ID', 'CLOSE']);
+ });
+
it('tokenizes {{.}} as OPEN ID CLOSE', function() {
var result = tokenize('{{.}}');
shouldMatchTokens(result, ['OPEN', 'ID', 'CLOSE']);