9 eval "use IO::AtomicFile";
10 plan skip_all => "IO::AtomicFile is required for this test" if $@;
12 plan skip_all => "JSON::Any is required for this test" if $@;
14 # this is because JSON::XS is
15 # the only one which really gets
19 $ENV{JSON_ANY_ORDER} = qw(XS);
20 $ENV{JSON_ANY_CONFIG} = "utf8=1";
23 use_ok('MooseX::Storage');
33 with Storage( 'format' => 'JSON', 'io' => 'AtomicFile' );
35 has 'utf8_string' => (
38 default => sub { "ネットスーパー (Internet Shopping)" }
42 my $file = 'temp.json';
46 isa_ok( $foo, 'Foo' );
52 my $foo = Foo->load($file);
56 "ネットスーパー (Internet Shopping)",
57 '... got the string we expected');
66 utf8_string => 'Escritório'
68 isa_ok( $foo, 'Foo' );
74 my $foo = Foo->load($file);
77 ok(utf8::is_utf8($foo->utf8_string), '... the string is still utf8');
81 '... got the string we expected');