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