use strict;
use File::Copy::Recursive qw( rcopy );
my $dist = 'fake_dist_01';
my $orig = Path::Tiny->new('.')->absolute;
my $source = Path::Tiny->new('.')->child('corpus')->child($dist);
my $tempdir = Path::Tiny->tempdir;
my $chdir_tempdir = Path::Tiny->tempdir;
rcopy( "$source", "$tempdir" );
my $dist_ini = $tempdir->child('dist.ini');
BAIL_OUT("test setup failed to copy to tempdir") if not -e $dist_ini and -f $dist_ini;
my $builder;
is(
exception {
chdir $chdir_tempdir;
$builder = Builder->from_config( { dist_root => "$tempdir" } );
$builder->build;
},
undef,
"dzil build ran ok"
);
chdir $orig;
is( $builder->version, '1.002003', 'Mantissa is forced to number' );
done_testing;