always run all tests during release
[p5sagit/Config-Any.git] / t / 55-yaml.t
index 7b7b5bc..0f80d26 100644 (file)
@@ -3,13 +3,14 @@ use warnings;
 no warnings 'once';
 
 use Test::More;
+use Config::Any;
 use Config::Any::YAML;
 
-if ( !Config::Any::YAML->is_supported ) {
+if ( !Config::Any::YAML->is_supported && !$ENV{RELEASE_TESTING} ) {
     plan skip_all => 'YAML format not supported';
 }
 else {
-    plan tests => 4;
+    plan tests => 6;
 }
 
 {
@@ -23,6 +24,15 @@ else {
     my $file = 't/invalid/conf.yml';
     my $config = eval { Config::Any::YAML->load( $file ) };
 
-    ok( !$config, 'config load failed' );
-    ok( $@,       "error thrown ($@)" );
+    is $config, undef, 'config load failed';
+    isnt $@, '', 'error thrown';
+}
+
+# parse error generated on invalid config
+{
+    my $file = 't/invalid/conf.yml';
+    my $config = eval { Config::Any->load_files( { files => [$file], use_ext => 1} ) };
+
+    is $config, undef, 'config load failed';
+    isnt $@, '', 'error thrown';
 }