X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FConfig-Any.git;a=blobdiff_plain;f=t%2F55-yaml.t;fp=t%2F55-yaml.t;h=d042cc457e317504fb50419ed7386b6fcbbbedb3;hp=3c95831e6e28243d9687002642d136fc6064ccb3;hb=5770ffc01feb6998b8a7e23d66b52d33e4a62b35;hpb=692fc1958052bf9e7783f424e9733efde5736aeb diff --git a/t/55-yaml.t b/t/55-yaml.t index 3c95831..d042cc4 100644 --- a/t/55-yaml.t +++ b/t/55-yaml.t @@ -8,7 +8,7 @@ if ( !Config::Any::YAML->is_supported ) { plan skip_all => 'YAML format not supported'; } else { - plan tests => 2; + plan tests => 4; } { @@ -16,3 +16,12 @@ else { ok( $config ); is( $config->{ name }, 'TestApp' ); } + +# test invalid config +{ + my $file = 't/invalid/conf.yml'; + my $config = eval { Config::Any::YAML->load( $file ) }; + + ok( !$config, 'config load failed' ); + ok( $@, "error thrown ($@)" ); +}