X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FConfig-Any.git;a=blobdiff_plain;f=t%2F55-yaml.t;h=907d576bdd1229bba5ff03851fd0f649d961a775;hp=0f80d26ababcba1a80e1a802f68135c0d131110a;hb=3a4895023ae6455d2fdef716214e94c3e3ddfdcc;hpb=712235202a9cc46d4d5efa86a7f40c64771f9498 diff --git a/t/55-yaml.t b/t/55-yaml.t index 0f80d26..907d576 100644 --- a/t/55-yaml.t +++ b/t/55-yaml.t @@ -5,6 +5,16 @@ no warnings 'once'; use Test::More; use Config::Any; use Config::Any::YAML; +use Data::Dumper; + +sub _dump { + local $Data::Dumper::Terse = 1; + local $Data::Dumper::Sortkeys = 1; + local $Data::Dumper::Indent = 1; + my $out = Data::Dumper::Dumper(@_); + $out =~ s/\s*\z//; + $out eq 'undef' ? undef : $out; +} if ( !Config::Any::YAML->is_supported && !$ENV{RELEASE_TESTING} ) { plan skip_all => 'YAML format not supported'; @@ -24,7 +34,8 @@ else { my $file = 't/invalid/conf.yml'; my $config = eval { Config::Any::YAML->load( $file ) }; - is $config, undef, 'config load failed'; + + is _dump($config), undef, 'config load failed'; isnt $@, '', 'error thrown'; } @@ -33,6 +44,6 @@ else { my $file = 't/invalid/conf.yml'; my $config = eval { Config::Any->load_files( { files => [$file], use_ext => 1} ) }; - is $config, undef, 'config load failed'; + is _dump($config), undef, 'config load failed'; isnt $@, '', 'error thrown'; }