82dee7de92a0bd35 failed to add ext/lib/Makefile.PL. Oops.
[p5sagit/p5-mst-13.2.git] / ext / ExtUtils-MakeMaker / t / MM_BeOS.t
CommitLineData
39234879 1#!/usr/bin/perl
b9e9e3f2 2
3BEGIN {
b78fd716 4 unshift @INC, 't/lib';
b9e9e3f2 5}
39234879 6chdir 't';
b9e9e3f2 7
8use Test::More;
9
10BEGIN {
1487aac6 11 if ($^O =~ /beos/i or $^O eq 'haiku') {
dbc1d986 12 plan tests => 4;
b9e9e3f2 13 } else {
14 plan skip_all => 'This is not BeOS';
15 }
16}
17
18use Config;
19use File::Spec;
20use File::Basename;
21
22# tels - Taken from MM_Win32.t - I must not understand why this works, right?
23# Does this mimic ExtUtils::MakeMaker ok?
24{
25 @MM::ISA = qw(
26 ExtUtils::MM_Unix
27 ExtUtils::Liblist::Kid
28 ExtUtils::MakeMaker
29 );
30 # MM package faked up by messy MI entanglement
31 package MM;
32 sub DESTROY {}
33}
34
35require_ok( 'ExtUtils::MM_BeOS' );
36
dbc1d986 37my $MM = bless { NAME => "Foo" }, 'MM';
479d2113 38
39# init_linker
b9e9e3f2 40{
479d2113 41 my $libperl = File::Spec->catfile('$(PERL_INC)',
42 $Config{libperl} || 'libperl.a' );
43 my $export = '';
44 my $after = '';
45 $MM->init_linker;
46
47 is( $MM->{PERL_ARCHIVE}, $libperl, 'PERL_ARCHIVE' );
48 is( $MM->{PERL_ARCHIVE_AFTER}, $after, 'PERL_ARCHIVE_AFTER' );
49 is( $MM->{EXPORT_LIST}, $export, 'EXPORT_LIST' );
b9e9e3f2 50}