1#!/usr/bin/perl
2
3BEGIN {
4    unshift @INC, 't/lib';
5}
6chdir 't';
7
8use Test::More;
9
10BEGIN {
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
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
37my $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}
51