summaryrefslogtreecommitdiffstats
path: root/spec/parser.js
diff options
context:
space:
mode:
authorkpdecker <kpdecker@gmail.com>2014-01-17 16:31:59 -0600
committerkpdecker <kpdecker@gmail.com>2014-01-17 17:51:52 -0600
commitf90981adf608f98551d527c3109771d8babbba9f (patch)
tree29ba3b68c17a9964cca673d4a9d0ceb8bdc00168 /spec/parser.js
parent93a3725480d07235afcb4155fd876d650e2ff8c0 (diff)
downloadhandlebars.js-f90981adf608f98551d527c3109771d8babbba9f.zip
handlebars.js-f90981adf608f98551d527c3109771d8babbba9f.tar.gz
handlebars.js-f90981adf608f98551d527c3109771d8babbba9f.tar.bz2
Add partial hash parser support
Diffstat (limited to 'spec/parser.js')
-rw-r--r--spec/parser.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/parser.js b/spec/parser.js
index 70c1635..0f6ed31 100644
--- a/spec/parser.js
+++ b/spec/parser.js
@@ -84,6 +84,14 @@ describe('parser', function() {
equals(ast_for("{{> foo bar}}"), "{{> PARTIAL:foo ID:bar }}\n");
});
+ it('parses a partial with hash', function() {
+ equals(ast_for("{{> foo bar=bat}}"), "{{> PARTIAL:foo HASH{bar=ID:bat} }}\n");
+ });
+
+ it('parses a partial with context and hash', function() {
+ equals(ast_for("{{> foo bar bat=baz}}"), "{{> PARTIAL:foo ID:bar HASH{bat=ID:baz} }}\n");
+ });
+
it('parses a partial with a complex name', function() {
equals(ast_for("{{> shared/partial?.bar}}"), "{{> PARTIAL:shared/partial?.bar }}\n");
});