ExtUtils-MakeMaker

 view release on metacpan or  search on metacpan

t/MM_Unix.t  view on Meta::CPAN

    }

    ok !$t->maybe_command('command') ,"non executable file isn't a command";

    chmod 0755, "command";
    ok ($t->maybe_command('command'),        "executable file is a command");
}
unlink "command";


###############################################################################
# perl_script (on unix any ordinary, readable file)

my $self_name = 'MM_Unix.t';
is ($t->perl_script($self_name),$self_name, 'we pass as a perl_script()');

###############################################################################
# PERM_RW and PERM_RWX

$t->init_PERM;
is ($t->{PERM_RW},'644', 'PERM_RW is 644');
is ($t->{PERM_RWX},'755', 'PERM_RWX is 755');
is ($t->{PERM_DIR},'755', 'PERM_DIR is 755');


###############################################################################
# post_constants, postamble, post_initialize

foreach (qw/ post_constants postamble post_initialize/) {
  is ($t->$_(),'', "$_() is an empty string");
}

###############################################################################
# replace_manpage_separator

is ($t->replace_manpage_separator('Foo/Bar'),'Foo::Bar','manpage_separator');

###############################################################################

$t->init_linker;
foreach (qw/ EXPORT_LIST PERL_ARCHIVE PERL_ARCHIVE_AFTER /)
{
    ok( exists $t->{$_}, "$_ was defined" );
    is( $t->{$_}, '', "$_ is empty on Unix");
}


{
    $t->{CCFLAGS} = '-DMY_THING';
    $t->{LIBPERL_A} = 'libperl.a';
    $t->{LIB_EXT}   = '.a';
    local $t->{NEEDS_LINKING} = 1;
    $t->cflags();

    # Brief bug where CCFLAGS was being blown away
    like( $t->{CCFLAGS}, qr/\-DMY_THING/,    'cflags retains CCFLAGS' );
}

{
    my @targv = ("var=don't forget about spaces and single quotes");
    local @ARGV = @targv;
    my $t = bless { NAME => "Foo", FULLPERL => $0, DIR => [] }, $class;
    $t->makeaperl( TARGET => "Tgt" );
    is_deeply( \@ARGV, \@targv, 'ARGV is not polluted by makeaperl' );
}



( run in 1.323 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )