Skip to content

Commit

Permalink
test multiple newlines too
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jan 20, 2017
1 parent 21aab88 commit db9c97c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Changes
@@ -1,5 +1,5 @@

7.21 2017-01-19
7.21 2017-01-20
- Added extract_usage function to Mojo::Util.
- Improve getopt function in Mojo::Util to use @ARGV by default.

Expand Down
5 changes: 5 additions & 0 deletions t/mojo/template.t
Expand Up @@ -1050,6 +1050,11 @@ $mt = Mojo::Template->new;
$output = $mt->render("test\n\n123\n\n<% %>456\n789");
is $output, "test\n\n123\n\n456\n789\n", 'empty statement';

# Multiple newlines
$mt = Mojo::Template->new;
$output = $mt->render("test\n\n\n\n");
is $output, "test\n", 'just one newline remaining';

# Optimize successive text lines ending with newlines
$mt = Mojo::Template->new;
$mt->parse(<<'EOF');
Expand Down

0 comments on commit db9c97c

Please sign in to comment.