diff --git a/Changes b/Changes index 52eb1b3..7c71df4 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,7 @@ Revision history for Mojolicious::Plugin::TtRenderer {{$NEXT}} + - Set locale "C" in tests that rely on it 1.30 December 22, 2012 - Don't rely on English locale in the test t/tt_plugin_lite_app.t diff --git a/t/tt_plugin_lite_app.t b/t/tt_plugin_lite_app.t index 6d1bb92..6735752 100644 --- a/t/tt_plugin_lite_app.t +++ b/t/tt_plugin_lite_app.t @@ -5,6 +5,18 @@ use strict; use warnings; +BEGIN { + #use if $^O ne 'MSWin32', POSIX => qw/setlocale LC_ALL/; + #setlocale(&LC_ALL, 'C') if $^O ne 'MSWin32'; + unless($^O eq 'MSWin32') { + eval q{ + use POSIX qw( setlocale LC_ALL ); + setlocale(LC_ALL, 'C'); + }; + warn $@ if $@; + } +} + use File::Temp; use Mojo::IOLoop; use Test::More; @@ -41,7 +53,7 @@ my $t = Test::Mojo->new; # Simple TT template $t->get_ok('/')->status_is(200) ->content_like(qr/test123456/); -$t->get_ok('/blow')->status_is(500)->content_like(qr/file error - doesnotexist.tt:/); +$t->get_ok('/blow')->status_is(500)->content_like(qr/file error - doesnotexist\.tt: No such file or directory/); if(eval q{ use Devel::Cycle; 1 }) {