summaryrefslogtreecommitdiffstats
path: root/t/expressions.t
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2012-10-04 18:43:04 -0500
committerJesse Luehrs <doy@tozt.net>2012-10-04 18:43:38 -0500
commit3aa97f35d6a363350e2c3c41c731c93721b348ac (patch)
tree470f9ddcf14226a06b0c31361fc49d9937fb496c /t/expressions.t
parent8f48b142b49caf1d1e49b2124a27433fecbf5cfa (diff)
downloadtext-handlebars-3aa97f35d6a363350e2c3c41c731c93721b348ac.tar.gz
text-handlebars-3aa97f35d6a363350e2c3c41c731c93721b348ac.zip
make {{this}} an alias to {{.}} and make them work at the top level
Diffstat (limited to 't/expressions.t')
-rw-r--r--t/expressions.t16
1 files changed, 16 insertions, 0 deletions
diff --git a/t/expressions.t b/t/expressions.t
index 08d0894..f12022c 100644
--- a/t/expressions.t
+++ b/t/expressions.t
@@ -87,4 +87,20 @@ render_ok(
);
}
+render_ok(
+ '{{.}} {{this}}',
+ "foo",
+ "foo foo",
+ "top level current context"
+);
+
+render_ok(
+ '{{#thing}}{{.}} {{this}}{{/thing}}',
+ {
+ thing => [ "foo" ],
+ },
+ "foo foo",
+ "nested current context"
+);
+
done_testing;