File-ShareDir-Dist
view release on metacpan or search on metacpan
t/file_sharedir_dist_install.t view on Meta::CPAN
is_deeply $config, { 'key5' => 'val5', 'key6' => 'val6' };
};
subtest 'install_config_* (key/value) @ARGV' => sub {
chdir tempdir( CLEANUP => 1 );
my $dir = install_dir 'Foo-Bar-Baz';
{
local @ARGV = ('Foo-Bar-Baz', key5 => 'val5');
install_config_set;
}
ok -d $dir, 'directory created';
my $config = install_config_get 'Foo-Bar-Baz';
is_deeply $config, { 'key5' => 'val5' };
};
sub create_faux_share
t/file_sharedir_dist_install.t view on Meta::CPAN
};
subtest 'install @ARGV' => sub {
chdir tempdir( CLEANUP => 1 );
create_faux_share;
{
local @ARGV = ('share', 'Foo-Bar-Baz');
install;
}
ok -f 'blib/lib/auto/share/dist/Foo-Bar-Baz/blarpho1.txt';
ok -f 'blib/lib/auto/share/dist/Foo-Bar-Baz/blarpho1/blarpho2.txt';
my $blarpho1 = do {
open my $fh, '<', 'blib/lib/auto/share/dist/Foo-Bar-Baz/blarpho1.txt';
local $/;
<$fh>;
( run in 1.328 second using v1.01-cache-2.11-cpan-49f99fa48dc )