-#!perl
-
-# 2001-01-14 Tels v0.01
-
-our $VERSION = 0.01;
+#!/usr/bin/perl
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
+ 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 => 2;
+ if ($^O =~ /beos/i or $^O eq 'haiku') {
+ plan tests => 4;
} else {
plan skip_all => 'This is not BeOS';
}
require_ok( 'ExtUtils::MM_BeOS' );
-# perl_archive()
+my $MM = bless { NAME => "Foo" }, 'MM';
+
+# init_linker
{
- my $libperl = $Config{libperl} || 'libperl.a';
- is( MM->perl_archive(), File::Spec->catfile('$(PERL_INC)', $libperl ),
- 'perl_archive() should respect libperl setting' );
+ 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' );
}