summaryrefslogtreecommitdiffstats
path: root/spec/qunit_spec.js
diff options
context:
space:
mode:
authorkpdecker <kpdecker@gmail.com>2013-05-29 10:46:28 -0400
committerkpdecker <kpdecker@gmail.com>2013-05-29 10:46:28 -0400
commitda2aabe7bdc75e29178d920332fad9de183de8a0 (patch)
tree72284cfb52e8edebe294b0e40f115e99500464aa /spec/qunit_spec.js
parent3ddbc5237f5208f40a7d438895fe2249bdf343b9 (diff)
downloadhandlebars.js-da2aabe7bdc75e29178d920332fad9de183de8a0.zip
handlebars.js-da2aabe7bdc75e29178d920332fad9de183de8a0.tar.gz
handlebars.js-da2aabe7bdc75e29178d920332fad9de183de8a0.tar.bz2
Allow ID, STRING, or INTEGER for partial name
Fixes #519
Diffstat (limited to 'spec/qunit_spec.js')
-rw-r--r--spec/qunit_spec.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/qunit_spec.js b/spec/qunit_spec.js
index 5f14db0..933c8ed 100644
--- a/spec/qunit_spec.js
+++ b/spec/qunit_spec.js
@@ -602,6 +602,26 @@ test("Partials with integer path", function() {
shouldCompileToWithPartials(string, [hash, {}, {404:dude}], true, "Dudes: Jeepers", "Partials can use literal paths");
});
+test("Partials with complex path", function() {
+ var string = "Dudes: {{> 404/asdf?.bar}}";
+ var dude = "{{name}}";
+ var hash = {name:"Jeepers", another_dude:"Creepers"};
+ shouldCompileToWithPartials(string, [hash, {}, {'404/asdf?.bar':dude}], true, "Dudes: Jeepers", "Partials can use literal paths");
+});
+
+test("Partials with escaped", function() {
+ var string = "Dudes: {{> [+404/asdf?.bar]}}";
+ var dude = "{{name}}";
+ var hash = {name:"Jeepers", another_dude:"Creepers"};
+ shouldCompileToWithPartials(string, [hash, {}, {'+404/asdf?.bar':dude}], true, "Dudes: Jeepers", "Partials can use literal paths");
+});
+
+test("Partials with string", function() {
+ var string = "Dudes: {{> \"+404/asdf?.bar\"}}";
+ var dude = "{{name}}";
+ var hash = {name:"Jeepers", another_dude:"Creepers"};
+ shouldCompileToWithPartials(string, [hash, {}, {'+404/asdf?.bar':dude}], true, "Dudes: Jeepers", "Partials can use literal paths");
+});
suite("String literal parameters");