added a flatten_to_hash option to return a simple key-value hashref instead of the...
[p5sagit/Config-Any.git] / t / 50-general.t
index ec0dc53..e173624 100644 (file)
@@ -8,7 +8,7 @@ if ( !Config::Any::General->is_supported ) {
     plan skip_all => 'Config::General format not supported';
 }
 else {
-    plan tests => 4;
+    plan tests => 6;
 }
 
 {
@@ -23,3 +23,12 @@ else {
         { -LowerCaseNames => 1 } );
     ok( exists $config->{ component } );
 }
+
+# test invalid config
+{
+    my $file   = 't/invalid/conf.conf';
+    my $config = eval { Config::Any::General->load( $file ) };
+
+    ok( !$config, 'config load failed' );
+    ok( $@, "error thrown ($@)" ); 
+}