From 6d3b76546c92f15aadc2a9c4b7568411e49ccfbe Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 8 Oct 2012 13:33:45 -0500 Subject: implement hash parameters for block helpers --- t/block-helpers.t | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 't') diff --git a/t/block-helpers.t b/t/block-helpers.t index 4b68d1e..3cd6cb8 100644 --- a/t/block-helpers.t +++ b/t/block-helpers.t @@ -287,26 +287,25 @@ RENDERED "if/else helper (false)" ); -{ local $TODO = "unimplemented"; local $SIG{__WARN__} = sub { }; render_ok( { helpers => { list => sub { my ($context, $items, $options) = @_; - my $attrs = join ' ', map { $_ => $options->{hash}{$_} } + my $attrs = join ' ', map { "$_=\"$options->{hash}{$_}\"" } sort keys %{ $options->{hash} }; return ""; + . "\n"; }, }, }, <<'TEMPLATE', -{{list nav id="nav-bar" class="top"}} +{{#list nav id="nav-bar" class="top"}} {{title}} {{/list}} TEMPLATE @@ -325,12 +324,13 @@ TEMPLATE <<'RENDERED', RENDERED "helper arguments" ); +{ local $TODO = "unimplemented"; local $SIG{__WARN__} = sub { }; # XXX this is almost certainly not what the api should be like, but i don't # understand the purpose for this feature well enough to come up with anything # more reasonable. feedback welcome! -- cgit v1.2.3-54-g00ecf