Reworked the way that expression work a good bit. They're a lot less error prone now.

This commit is contained in:
Alan Johnson
2010-09-24 22:26:10 -04:00
parent a07dae5d8e
commit c1bcd72eb1
2 changed files with 40 additions and 25 deletions
+5
View File
@@ -103,6 +103,11 @@ test("bad idea nested paths", function() {
shouldCompileTo(string, hash, "world world world ", "Same context (.) is ignored in paths");
});
test("complex but empty paths", function() {
shouldCompileTo("{{person/name}}", {person: {name: null}}, "");
shouldCompileTo("{{person/name}}", {person: {}}, "");
});
test("this keyword in paths", function() {
var string = "{{#goodbyes}}{{this}}{{/goodbyes}}";
var hash = {goodbyes: ["goodbye", "Goodbye", "GOODBYE"]};