summaryrefslogtreecommitdiffstats
path: root/spec/qunit_spec.js
diff options
context:
space:
mode:
authorAlan Johnson <alan@commondream.net>2011-09-02 09:04:41 -0400
committerAlan Johnson <alan@commondream.net>2011-09-02 09:04:41 -0400
commitfc84308cc9124c94dcd372629d15bd10ce30875d (patch)
tree6d36b6dcfa946127cebf01dff27921ef8b3f7e1e /spec/qunit_spec.js
parent91bbc4fd2ca1e161fad3fba0c51a3732216503b3 (diff)
downloadhandlebars.js-fc84308cc9124c94dcd372629d15bd10ce30875d.zip
handlebars.js-fc84308cc9124c94dcd372629d15bd10ce30875d.tar.gz
handlebars.js-fc84308cc9124c94dcd372629d15bd10ce30875d.tar.bz2
Got simple literal expressions added into paths.
Diffstat (limited to 'spec/qunit_spec.js')
-rw-r--r--spec/qunit_spec.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/qunit_spec.js b/spec/qunit_spec.js
index 1774bbf..fe4866a 100644
--- a/spec/qunit_spec.js
+++ b/spec/qunit_spec.js
@@ -130,6 +130,11 @@ test("nested paths with empty string value", function() {
"Goodbye world!", "Nested paths access nested objects with empty string");
});
+test("literal paths", function() {
+ shouldCompileTo("Goodbye {{[@alan]/expression}} world!", {"@alan": {expression: "beautiful"}},
+ "Goodbye beautiful world!", "Literal paths can be used");
+});
+
test("--- TODO --- bad idea nested paths", function() {
return;
var hash = {goodbyes: [{text: "goodbye"}, {text: "Goodbye"}, {text: "GOODBYE"}], world: "world"};
@@ -940,5 +945,4 @@ test("when inside a block in String mode, .. passes the appropriate context in t
}, {helpers: helpers});
equals(result, "STOP ME FROM READING HACKER NEWS I need-a dad.joke wot", "Proper context variable output");
-});
-
+}); \ No newline at end of file