r37256@bricas-laptop (orig r8347): bricas | 2008-09-03 10:53:01 -0300
[p5sagit/Config-Any.git] / t / 64-extfail.t
diff --git a/t/64-extfail.t b/t/64-extfail.t
new file mode 100644 (file)
index 0000000..d6cace8
--- /dev/null
@@ -0,0 +1,21 @@
+use strict;
+use warnings;
+
+use Test::More tests => 3;
+
+use Config::Any;
+
+{
+    my $result = eval {
+        Config::Any->load_files(
+            { files => [ 't/conf/conf.unsupported' ], use_ext => 1 } );
+    };
+
+    ok( !defined $result, 'empty result' );
+    ok( $@,               'error thrown' );
+    like(
+        $@,
+        qr/There are no loaders available for \.unsupported files/,
+        'error message'
+    );
+}