Skip to content

Commit

Permalink
Add tests for parameters fetched from @_
Browse files Browse the repository at this point in the history
  • Loading branch information
Tadeusz Sośnierz committed Oct 12, 2012
1 parent 58d4576 commit 0f73811
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion t/00-basic.t
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use Test;
use Template::Mojo;
plan 12;
plan 13;

sub render($tmpl, *@a) {
Template::Mojo.new($tmpl).render(|@a)
Expand All @@ -18,3 +18,5 @@ is render("% for 1..3 \{\nhello\n% \}\n"), "hello\nhello\nhello\n";
is render("hello\n%# die 'this is an harmless comment'\nworld"), "hello\nworld";
is render("<a href='foo'>bar</a>"), "<a href='foo'>bar</a>";
is render("a happy <%= \$^a %>\n", 'bar'), "a happy bar\n";
is render("% my (\$a, \$b) = \@_\n<%= \$a %> and <%= \$b %>", 5, 7),
'5 and 7';

0 comments on commit 0f73811

Please sign in to comment.