summaryrefslogtreecommitdiffstats
path: root/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
parentb6b1bd1936ea207c74ecf0993bd3b7c55c71ec57 (diff)
downloadtext-handlebars-8d8d169d9e30784474856a9b43c43cf21a3d6a91.tar.gz
text-handlebars-8d8d169d9e30784474856a9b43c43cf21a3d6a91.zip
make section lambdas work
Diffstat (limited to 't')
-rw-r--r--t/mustache-spec.t3
-rw-r--r--t/mustache.t11
2 files changed, 3 insertions, 11 deletions
diff --git a/t/mustache-spec.t b/t/mustache-spec.t
index 8ee1c10..a97cb10 100644
--- a/t/mustache-spec.t
+++ b/t/mustache-spec.t
@@ -16,9 +16,6 @@ for my $file (dir('t', 'mustache-spec', 'specs')->children) {
local $TODO = "unimplemented"
if $file->basename eq 'delimiters.json'
&& $test->{name} =~ /partial/i;
- local ($TODO, $SIG{__WARN__}) = ("unimplemented", sub { })
- if $file->basename eq '~lambdas.json'
- && $test->{name} =~ /section/i;
render_ok(
$test->{template},
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',