summaryrefslogtreecommitdiffstats
path: root/t/mustache.t
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2012-10-03 16:20:14 -0500
committerJesse Luehrs <doy@tozt.net>2012-10-03 16:20:14 -0500
commit8d8d169d9e30784474856a9b43c43cf21a3d6a91 (patch)
treea96a6c6900dd9732e97230d626256a3e6f7b1a94 /t/mustache.t
parentb6b1bd1936ea207c74ecf0993bd3b7c55c71ec57 (diff)
downloadtext-handlebars-8d8d169d9e30784474856a9b43c43cf21a3d6a91.tar.gz
text-handlebars-8d8d169d9e30784474856a9b43c43cf21a3d6a91.zip
make section lambdas work
Diffstat (limited to 't/mustache.t')
-rw-r--r--t/mustache.t11
1 files changed, 3 insertions, 8 deletions
diff --git a/t/mustache.t b/t/mustache.t
index 6da8dd8..bbd9227 100644
--- a/t/mustache.t
+++ b/t/mustache.t
@@ -87,7 +87,6 @@ RENDERED
"section with non-empty list"
);
-{ local $TODO = "unimplemented"; local $SIG{__WARN__} = sub { };
render_ok(
<<'TEMPLATE',
{{#wrapped}}
@@ -97,12 +96,9 @@ TEMPLATE
{
name => 'Willy',
wrapped => sub {
- return sub {
- my ($text) = @_;
- return '<b>'
- . Text::Handlebars->new->render_string($text) # XXX
- . '</b>';
- };
+ my ($text) = @_;
+ chomp($text);
+ return "<b>$text</b>\n";
},
},
<<'RENDERED',
@@ -110,7 +106,6 @@ TEMPLATE
RENDERED
"lambdas"
);
-}
render_ok(
<<'TEMPLATE',