update git repo url
[p5sagit/Config-Any.git] / t / 51-ini.t
index 6848004..5cee996 100644 (file)
@@ -2,13 +2,14 @@ use strict;
 use warnings;
 
 use Test::More;
+use Config::Any;
 use Config::Any::INI;
 
-if ( !Config::Any::INI->is_supported ) {
+if ( !Config::Any::INI->is_supported && !$ENV{RELEASE_TESTING} ) {
     plan skip_all => 'INI format not supported';
 }
 else {
-    plan tests => 13;
+    plan tests => 15;
 }
 
 {
@@ -49,9 +50,18 @@ else {
 
 # test invalid config
 {
-    my $file   = 't/invalid/conf.ini';
+    my $file = 't/invalid/conf.ini';
     my $config = eval { Config::Any::INI->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.ini';
+    my $config = eval { Config::Any->load_files( { files => [$file], use_ext => 1} ) };
+
+    is $config, undef, 'config load failed';
+    isnt $@, '', 'error thrown';
 }