ExtUtils::MakeMaker 6.03 -> 6.06_05ish
[p5sagit/p5-mst-13.2.git] / lib / ExtUtils / t / MM_OS2.t
index f80b0fb..caf662e 100644 (file)
@@ -1,12 +1,17 @@
-#!./perl -w
-
-use strict;
+#!/usr/bin/perl -w
 
 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 strict;
 use Test::More;
 if ($^O =~ /os2/i) {
        plan( tests => 32 );
@@ -242,26 +247,29 @@ ok( ExtUtils::MM_OS2->file_name_is_absolute( '\foo' ),
 ok( ! ExtUtils::MM_OS2->file_name_is_absolute( 'arduk' ), 
        '... but not for paths with no leading slash or volume' );
 
-# perl_archive
-is( ExtUtils::MM_OS2->perl_archive(), '$(PERL_INC)/libperl$(LIB_EXT)', 
-       'perl_archive() should return a static string' );
 
-# perl_archive_after
+$mm->init_linker;
+
+# PERL_ARCHIVE
+is( $mm->{PERL_ARCHIVE}, '$(PERL_INC)/libperl$(LIB_EXT)', 'PERL_ARCHIVE' );
+
+# PERL_ARCHIVE_AFTER
 {
        my $aout = 0;
        local *OS2::is_aout;
        *OS2::is_aout = \$aout;
        
-       isnt( ExtUtils::MM_OS2->perl_archive_after(), '', 
-               'perl_archive_after() should return string without $is_aout set' );
+    $mm->init_linker;
+       isnt( $mm->{PERL_ARCHIVE_AFTER}, '',
+               'PERL_ARCHIVE_AFTER should be empty without $is_aout set' );
        $aout = 1;
-       is( ExtUtils::MM_OS2->perl_archive_after(), '', 
+       is( $mm->{PERL_ARCHIVE_AFTER}, '', 
                '... and blank string if it is set' );
 }
 
-# export_list
-is( ExtUtils::MM_OS2::export_list({ BASEEXT => 'foo' }), 'foo.def', 
-       'export_list() should add .def to BASEEXT member' );
+# EXPORT_LIST
+is( $mm->{EXPORT_LIST}, '$(BASEEXT).def', 
+       'EXPORT_LIST should add .def to BASEEXT member' );
 
 END {
        use File::Path;