ExtUtils-Autoconf

 view release on metacpan or  search on metacpan

t/class.t  view on Meta::CPAN


use strict;
use warnings;
use Symbol qw(gensym);
use File::Which qw(which);
use Test::More tests => 21;
use Test::Exception;
use ExtUtils::Autoconf;

{
    local @ARGV = ('t/autoconf', (which('autoconf'))[0], (which('autoheader'))[0]);

    lives_ok(sub {
            ExtUtils::Autoconf->run_autogen;
    }, 'run_autogen');

    ok( -f 't/autoconf/config.h.in', 'config.h.in exists' );
    ok( -f 't/autoconf/configure', 'configure exists' );

    lives_ok(sub {
            ExtUtils::Autoconf->run_configure;

t/class.t  view on Meta::CPAN

        }, 'realclean');

        ok(  -f 't/autoconf/configure.ac', 'configure.ac still exists' );
        ok( !-f 't/autoconf/configure', 'configure deleted' );
        ok( !-f 't/autoconf/config.h.in', 'config.h.in deleted' );
        ok( !-d 't/autoconf/autom4te.cache', 'autom4te.cache deleted' );
    }
}

{
    local @ARGV = ();

    dies_ok(sub {
            ExtUtils::Autoconf->run_configure;
    }, 'configure fails with invalid wd');
}



( run in 0.596 second using v1.01-cache-2.11-cpan-49f99fa48dc )