summaryrefslogtreecommitdiffstats
path: root/spec/tokenizer.js
diff options
context:
space:
mode:
authorKevin Decker <kpdecker@gmail.com>2015-08-23 23:45:17 -0500
committerKevin Decker <kpdecker@gmail.com>2015-08-23 23:45:17 -0500
commitc727e1f97c471ec6be26b54dcd7422fd521a2471 (patch)
tree0979b5f54c7e98b317545a573d43ec6e8566d576 /spec/tokenizer.js
parent2571dd8e8e43fd320672763564b16a5b3ae33966 (diff)
parent1c274088c1ea9969f7a676fd5bebd11698f73116 (diff)
downloadhandlebars.js-c727e1f97c471ec6be26b54dcd7422fd521a2471.zip
handlebars.js-c727e1f97c471ec6be26b54dcd7422fd521a2471.tar.gz
handlebars.js-c727e1f97c471ec6be26b54dcd7422fd521a2471.tar.bz2
Merge pull request #1076 from wycats/partial-block
Implement partial blocks
Diffstat (limited to 'spec/tokenizer.js')
-rw-r--r--spec/tokenizer.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/tokenizer.js b/spec/tokenizer.js
index a474dfb..f170704 100644
--- a/spec/tokenizer.js
+++ b/spec/tokenizer.js
@@ -214,6 +214,10 @@ describe('Tokenizer', function() {
shouldMatchTokens(result, ['OPEN_PARTIAL', 'ID', 'SEP', 'ID', 'SEP', 'ID', 'CLOSE']);
});
+ it('tokenizes partial block declarations', function() {
+ var result = tokenize('{{#> foo}}');
+ shouldMatchTokens(result, ['OPEN_PARTIAL_BLOCK', 'ID', 'CLOSE']);
+ });
it('tokenizes a comment as "COMMENT"', function() {
var result = tokenize('foo {{! this is a comment }} bar {{ baz }}');
shouldMatchTokens(result, ['CONTENT', 'COMMENT', 'CONTENT', 'OPEN', 'ID', 'CLOSE']);