Skip to content

Commit

Permalink
ensure that we can write escapes that handle refs
Browse files Browse the repository at this point in the history
  • Loading branch information
rjbs committed Sep 26, 2013
1 parent 67adf0f commit d626b12
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions t/06-compiler.t
Original file line number Diff line number Diff line change
Expand Up @@ -1127,6 +1127,21 @@ EOF
expect_error => qr/content ending tag but no beginning tag/
);

#------------------------------------------------------------

$group->add_test( name => 'non_stringifying_escape',
description => 'stringify after escapes, not before',
component => <<'EOF',
% $m->interp->set_escape( blort => sub { ${$_[0]} = ${$_[0]}->[0] if ref ${$_[0]} } );
Works for <% 'strings' | blort %>
Works for <% ['refs'] | blort %>
EOF
expect => <<'EOF',
Works for strings
Works for refs
EOF
);

#------------------------------------------------------------

return $group;
Expand Down

0 comments on commit d626b12

Please sign in to comment.