82dee7de92a0bd35 failed to add ext/lib/Makefile.PL. Oops.
[p5sagit/p5-mst-13.2.git] / ext / ExtUtils-MakeMaker / t / MM_BeOS.t
1 #!/usr/bin/perl
2
3 BEGIN {
4     unshift @INC, 't/lib';
5 }
6 chdir 't';
7
8 use Test::More;
9
10 BEGIN {
11         if ($^O =~ /beos/i or $^O eq 'haiku') {
12                 plan tests => 4;
13         } else {
14                 plan skip_all => 'This is not BeOS';
15         }
16 }
17
18 use Config;
19 use File::Spec;
20 use 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
35 require_ok( 'ExtUtils::MM_BeOS' );
36
37 my $MM = bless { NAME => "Foo" }, 'MM';
38
39 # init_linker
40 {
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' );
50 }