X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F105_io_atomic_w_utf8.t;h=8aec7b435ecdda94a3c77a4e554b1435030ec184;hb=0edcbfee41be71fffd06f32db5c86574e156c29a;hp=d831409337f494b66da1544f937e0fe52bfa9b92;hpb=cfd008fa25b3cdd9721ef2fad9f4383cdc200ddc;p=gitmo%2FMooseX-Storage.git diff --git a/t/105_io_atomic_w_utf8.t b/t/105_io_atomic_w_utf8.t index d831409..8aec7b4 100644 --- a/t/105_io_atomic_w_utf8.t +++ b/t/105_io_atomic_w_utf8.t @@ -4,24 +4,25 @@ use strict; use warnings; use Test::More; -use Test::TempDir; +use File::Temp qw(tempdir); use File::Spec::Functions; my $dir = tempdir; +use Test::Requires { + 'JSON::Any' => 0.01, # skip all if not installed + 'IO::AtomicFile' => 0.01, +}; + BEGIN { - eval "use IO::AtomicFile"; - plan skip_all => "IO::AtomicFile is required for this test" if $@; - eval "use JSON::Any"; - plan skip_all => "JSON::Any is required for this test" if $@; # NOTE: # this is because JSON::XS is # the only one which really gets # utf8 correct # - SL - BEGIN { + BEGIN { $ENV{JSON_ANY_ORDER} = qw(XS); - $ENV{JSON_ANY_CONFIG} = "utf8=1"; - } + $ENV{JSON_ANY_CONFIG} = "utf8=0"; + } plan tests => 8; use_ok('MooseX::Storage'); }