From 8d8d169d9e30784474856a9b43c43cf21a3d6a91 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Wed, 3 Oct 2012 16:20:14 -0500 Subject: make section lambdas work --- t/mustache-spec.t | 3 --- t/mustache.t | 11 +++-------- 2 files changed, 3 insertions(+), 11 deletions(-) (limited to 't') 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 '' - . Text::Handlebars->new->render_string($text) # XXX - . ''; - }; + my ($text) = @_; + chomp($text); + return "$text\n"; }, }, <<'RENDERED', @@ -110,7 +106,6 @@ TEMPLATE RENDERED "lambdas" ); -} render_ok( <<'TEMPLATE', -- cgit v1.2.3-54-g00ecf