hv_fetchs() support
[p5sagit/p5-mst-13.2.git] / lib / ExtUtils / t / MM_Unix.t
index 3c1dc98..f9b07f8 100644 (file)
@@ -2,7 +2,7 @@
 
 BEGIN {
     if( $ENV{PERL_CORE} ) {
-        chdir 't' if -d 't';
+        chdir 't';
         @INC = '../lib';
     }
     else {
@@ -18,14 +18,12 @@ BEGIN {
         plan skip_all => 'Non-Unix platform';
     }
     else {
-        plan tests => 116;
+        plan tests => 110;
     }
 }
 
 BEGIN { use_ok( 'ExtUtils::MM_Unix' ); }
 
-use vars qw($VERSION);
-$VERSION = '0.02';
 use strict;
 use File::Spec;
 
@@ -34,7 +32,6 @@ my $class = 'ExtUtils::MM_Unix';
 # only one of the following can be true
 # test should be removed if MM_Unix ever stops handling other OS than Unix
 my $os =  ($ExtUtils::MM_Unix::Is_OS2  || 0)
-       + ($ExtUtils::MM_Unix::Is_Mac   || 0)
        + ($ExtUtils::MM_Unix::Is_Win32 || 0) 
        + ($ExtUtils::MM_Unix::Is_Dos   || 0)
        + ($ExtUtils::MM_Unix::Is_VMS   || 0); 
@@ -74,7 +71,6 @@ foreach ( qw /
   const_loadlibs
   constants
   depend
-  dir_target
   dist
   dist_basics
   dist_ci
@@ -127,7 +123,6 @@ foreach ( qw /
   xs_c
   xs_cpp
   xs_o
-  xsubpp_version 
   / )
   {
       can_ok($class, $_);
@@ -175,42 +170,23 @@ is ($t->libscan('Fatty'), 'Fatty', 'libscan on something not a VC file' );
 ###############################################################################
 # maybe_command
 
-is ($t->maybe_command('blargel'),undef,"'blargel' isn't a command");
+open(FILE, ">command"); print FILE "foo"; close FILE;
+ok (!$t->maybe_command('command') ,"non executable file isn't a command");
+chmod 0755, "command";
+ok ($t->maybe_command('command'),        "executable file is a command");
+unlink "command";
 
 ###############################################################################
 # nicetext (dummy method)
 
 is ($t->nicetext('LOTR'),'LOTR','nicetext');
 
-###############################################################################
-# parse_version
-
-my $self_name = $ENV{PERL_CORE} ? '../lib/ExtUtils/t/MM_Unix.t' 
-                                : 'MM_Unix.t';
-
-is( $t->parse_version($self_name), '0.02',  'parse_version on ourself');
-
-my %versions = (
-                '$VERSION = 0.0'    => 0.0,
-                '$VERSION = -1.0'   => -1.0,
-                '$VERSION = undef'  => 'undef',
-                '$wibble  = 1.0'    => 'undef',
-               );
-
-while( my($code, $expect) = each %versions ) {
-    open(FILE, ">VERSION.tmp") || die $!;
-    print FILE "$code\n";
-    close FILE;
-
-    is( $t->parse_version('VERSION.tmp'), $expect, $code );
-
-    unlink "VERSION.tmp";
-}
-
 
 ###############################################################################
 # perl_script (on unix any ordinary, readable file)
 
+my $self_name = $ENV{PERL_CORE} ? '../lib/ExtUtils/t/MM_Unix.t' 
+                                 : 'MM_Unix.t';
 is ($t->perl_script($self_name),$self_name, 'we pass as a perl_script()');
 
 ###############################################################################