summaryrefslogtreecommitdiffstats
path: root/spec/qunit_spec.js
diff options
context:
space:
mode:
authorkpdecker <kpdecker@gmail.com>2013-01-19 13:19:17 -0600
committerkpdecker <kpdecker@gmail.com>2013-01-19 13:19:17 -0600
commit228c75669fe25a13d7ad8779a86765a400c959f9 (patch)
tree1128b7ae36b8326458810941f3ac2983117d2f55 /spec/qunit_spec.js
parentd1fdb822911ed06c206fdb5fc75938d0742ed327 (diff)
downloadhandlebars.js-228c75669fe25a13d7ad8779a86765a400c959f9.zip
handlebars.js-228c75669fe25a13d7ad8779a86765a400c959f9.tar.gz
handlebars.js-228c75669fe25a13d7ad8779a86765a400c959f9.tar.bz2
Expand literal syntax tests
Diffstat (limited to 'spec/qunit_spec.js')
-rw-r--r--spec/qunit_spec.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/spec/qunit_spec.js b/spec/qunit_spec.js
index 159576d..62214ec 100644
--- a/spec/qunit_spec.js
+++ b/spec/qunit_spec.js
@@ -176,8 +176,15 @@ test("nested paths with empty string value", function() {
});
test("literal paths", function() {
- shouldCompileTo("Goodbye {{[@alan]/expression}} world!", {"@alan": {expression: "beautiful"}},
- "Goodbye beautiful world!", "Literal paths can be used");
+ shouldCompileTo("Goodbye {{[@alan]/expression}} world!", {"@alan": {expression: "beautiful"}},
+ "Goodbye beautiful world!", "Literal paths can be used");
+ shouldCompileTo("Goodbye {{[foo bar]/expression}} world!", {"foo bar": {expression: "beautiful"}},
+ "Goodbye beautiful world!", "Literal paths can be used");
+});
+
+test('literal references', function() {
+ shouldCompileTo("Goodbye {{[foo bar]}} world!", {"foo bar": "beautiful"},
+ "Goodbye beautiful world!", "Literal paths can be used");
});
test("that current context path ({{.}}) doesn't hit helpers", function() {