Skip to content

Commit

Permalink
better template customization test
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Nov 5, 2012
1 parent 30fcafa commit 4839160
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Changes
@@ -1,5 +1,5 @@

3.55 2012-11-03
3.55 2012-11-05
- Improved documentation.
- Improved tests.
- Fixed bug that prevented around_dispatch hooks from working correctly in
Expand Down
8 changes: 6 additions & 2 deletions t/mojolicious/twinkle_lite_app.t
@@ -1,5 +1,7 @@
use Mojo::Base -strict;

use utf8;

# Disable IPv6 and libev
BEGIN {
$ENV{MOJO_NO_IPV6} = 1;
Expand All @@ -8,6 +10,7 @@ BEGIN {

use Test::More;
use Mojolicious::Lite;
use Mojo::Util;
use Test::Mojo;

# Custom format
Expand All @@ -19,6 +22,7 @@ my $twinkle = {
auto_escape => 0,
capture_end => '-',
capture_start => '+',
escape => \&Mojo::Util::html_escape,
escape_mark => '*',
expression_mark => '*',
line_start => '.',
Expand Down Expand Up @@ -86,7 +90,7 @@ $t->get_ok('/')->status_is(200)->header_is('X-Append' => 'bar')

# GET /advanced
$t->get_ok('/advanced')->status_is(200)->header_is('X-Append' => 'bar')
->content_is("<escape me>\n123423");
->content_is("<escape me>∳\n123423");

# GET /docs
$t->get_ok('/docs')->status_is(200)->content_like(qr!<h3>snowman</h3>!);
Expand Down Expand Up @@ -121,7 +125,7 @@ Hello *** $name **!\
test<%= content %>123\
@@ advanced.foo.twinkle
.** '<escape me>'
.** "<escape me>\x{2233}"
. my $numbers = [1 .. 4];
** for my $i (@$numbers) { ***
*** $i ***
Expand Down

0 comments on commit 4839160

Please sign in to comment.