Permalink
Browse files

slightly more portable template test

  • Loading branch information...
1 parent 0ba0545 commit e57e7c5777c95e168ab438193842a04195ec49ba @kraih committed Mar 13, 2012
Showing with 4 additions and 2 deletions.
  1. +1 −0 Changes
  2. +3 −2 t/mojo/template.t
View
@@ -6,6 +6,7 @@ This file documents the revision history for Perl extension Mojolicious.
- Made text_area helper a little smarter. (sshaw, sri)
- Improved inactivity timeout logging for WebSockets.
- Improved documentation.
+ - Improved tests.
- Fixed escaping bug in select_field and text_area helpers.
- Fixed Windows bug in "asset.t".
View
@@ -27,8 +27,9 @@ use FindBin;
use Mojo::Template;
# Consistent scalar context
-my $mt = Mojo::Template->new;
-my $output = $mt->render('<%= split /,/, "a,b" %>:<%== split /,/, "a,b" %>');
+my $mt = Mojo::Template->new;
+$mt->prepend('my @foo = (3, 4);');
+my $output = $mt->render('<%= @foo %>:<%== @foo %>');
is $output, "2:2\n", 'same context';
# Trim tag

0 comments on commit e57e7c5

Please sign in to comment.