File: MM_BeOS.t

package info (click to toggle)
perl 5.8.8-7etch6
  • links: PTS
  • area: main
  • in suites: etch
  • size: 60,396 kB
  • ctags: 33,629
  • sloc: perl: 199,713; ansic: 160,511; sh: 33,095; pascal: 8,270; lisp: 6,121; makefile: 2,373; cpp: 2,035; yacc: 1,047; java: 23
file content (56 lines) | stat: -rwxr-xr-x 1,162 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/usr/bin/perl

BEGIN {
    if( $ENV{PERL_CORE} ) {
        chdir 't' if -d 't';
        @INC = '../lib';
    }
    else {
        unshift @INC, 't/lib';
    }
}
chdir 't';

use Test::More;

BEGIN {
	if ($^O =~ /beos/i) {
		plan tests => 4;
	} else {
		plan skip_all => 'This is not BeOS';
	}
}

use Config;
use File::Spec;
use File::Basename;

# tels - Taken from MM_Win32.t - I must not understand why this works, right?
# Does this mimic ExtUtils::MakeMaker ok?
{
    @MM::ISA = qw(
        ExtUtils::MM_Unix 
        ExtUtils::Liblist::Kid 
        ExtUtils::MakeMaker
    );
    # MM package faked up by messy MI entanglement
    package MM;
    sub DESTROY {}
}

require_ok( 'ExtUtils::MM_BeOS' );

my $MM = bless { NAME => "Foo" }, 'MM';

# init_linker
{
    my $libperl = File::Spec->catfile('$(PERL_INC)', 
                                      $Config{libperl} || 'libperl.a' );
    my $export  = '';
    my $after   = '';
    $MM->init_linker;

    is( $MM->{PERL_ARCHIVE},        $libperl,   'PERL_ARCHIVE' );
    is( $MM->{PERL_ARCHIVE_AFTER},  $after,     'PERL_ARCHIVE_AFTER' );
    is( $MM->{EXPORT_LIST},         $export,    'EXPORT_LIST' );
}