summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2012-10-04 16:10:13 -0500
committerJesse Luehrs <doy@tozt.net>2012-10-04 16:10:13 -0500
commit3cb2968e248cca93ab6e62e02fa733e8d7d26887 (patch)
tree18f01b10e50169fe4e0ac8f25394117c5d0e9b61 /t
parentc4fd3dc97042a13cf365f06dd84bb6b02a1efdfb (diff)
downloadtext-handlebars-3cb2968e248cca93ab6e62e02fa733e8d7d26887.tar.gz
text-handlebars-3cb2968e248cca93ab6e62e02fa733e8d7d26887.zip
make lambdas work with field access
Diffstat (limited to 't')
-rw-r--r--t/lambdas.t15
1 files changed, 15 insertions, 0 deletions
diff --git a/t/lambdas.t b/t/lambdas.t
new file mode 100644
index 0000000..bdad45b
--- /dev/null
+++ b/t/lambdas.t
@@ -0,0 +1,15 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use lib 't/lib';
+use Test::More;
+use Test::Handlebars;
+
+render_ok(
+ '{{foo.bar.baz}} / {{{foo.bar.baz}}}',
+ { foo => { bar => { baz => sub { '<BAZ>' } } } },
+ '&lt;BAZ&gt; / <BAZ>',
+ "lambdas with field access"
+);
+
+done_testing;