App-Open
view release on metacpan or search on metacpan
t/10-backend-yaml.t view on Meta::CPAN
#
# XXX this indirectly tests the %s templating functionality
#
is( $tmp->def_file, $def_file );
is( $tmp->lookup_file("gz"), "gunzip %s" );
is( $tmp->lookup_file(".gz"), "gunzip %s" );
ok( !$tmp->lookup_file(".foo") );
lives_ok { $tmp = CLASS->new( [$def_file] ) };
is( $tmp->lookup_url("http"), "echo" );
is( $tmp->lookup_file("http"), "not_a_url" );
$def_file = "t/resource/backends/yaml/bad_def1.yaml";
throws_ok { $tmp = CLASS->new( [$def_file] ) } qr/BACKEND_CONFIG_ERROR/;
$def_file = "t/resource/backends/yaml/bad_def2.yaml";
throws_ok { $tmp = CLASS->new( [$def_file] ) } qr/BACKEND_CONFIG_ERROR/;
$def_file = "t/resource/backends/yaml/bad_def3.yaml";
throws_ok { local $^W = 0; $tmp = CLASS->new( [$def_file] ) } qr/BACKEND_CONFIG_ERROR/;
t/resource/backends/yaml/def1.yaml view on Meta::CPAN
---
"gz": "gunzip %s"
"http:": echo
"http": not_a_url
( run in 0.984 second using v1.01-cache-2.11-cpan-cc502c75498 )