summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Kennedy <adam@ali.as>2006-09-14 09:00:40 +0000
committerAdam Kennedy <adam@ali.as>2006-09-14 09:00:40 +0000
commit3bbdddec86b2c09d14d44dd0ff5e9f207f1bc640 (patch)
treef2e570c1fa2839a2ff202671d616f714175cecc0
parent217851d10d07b6e50d7632aee2e59eb6bfd1f845 (diff)
Starting to port to Win32
-rw-r--r--Makefile.PL24
-rw-r--r--lib/File/Flat.pm2
-rw-r--r--t/01_main.t30
3 files changed, 30 insertions, 26 deletions
diff --git a/Makefile.PL b/Makefile.PL
index b57676e..dd0c5fb 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -2,17 +2,17 @@ use inc::Module::Install;
name 'File-Flat';
all_from 'lib/File/Flat.pm';
-requires 'Cwd' => 0;
-requires 'prefork' => '0.02';
-requires 'File::Spec' => '0.85'; # Faster and featureful
-requires 'File::Copy' => '0';
-requires 'File::NCopy' => '0.32'; # Up to 0.34 ASAP
-requires 'File::Slurp' => '9999.04';
-requires 'File::Remove' => '0.21'; # Required for File::Spec support
-requires 'File::Temp' => '0.14'; # Some bugs below 0.12 could matter
-requires 'IO::File' => 0;
-build_requires 'Test::More' => '0.47';
-build_requires 'Test::ClassAPI' => '1.02';
-build_requires 'File::Find' => 0; # Avoid use of system chmod -R in test script
+requires 'Cwd' => 0;
+requires 'prefork' => '0.02';
+requires 'File::Spec' => '0.85'; # Faster and featureful
+requires 'File::Copy' => 0;
+requires 'File::Copy::Recursive' => '0.28';
+requires 'File::Slurp' => '9999.04';
+requires 'File::Remove' => '0.21'; # Required for File::Spec support
+requires 'File::Temp' => '0.14'; # Some bugs below 0.12 could matter
+requires 'IO::File' => 0;
+build_requires 'Test::More' => '0.47';
+build_requires 'Test::ClassAPI' => '1.02';
+build_requires 'File::Find' => 0; # Avoid use of system chmod -R in test script
WriteAll;
diff --git a/lib/File/Flat.pm b/lib/File/Flat.pm
index 6cef6e8..58f251d 100644
--- a/lib/File/Flat.pm
+++ b/lib/File/Flat.pm
@@ -14,7 +14,7 @@ use IO::File ();
use prefork 'File::Slurp';
use prefork 'File::Temp';
use prefork 'File::Copy';
-use prefork 'File::NCopy';
+use prefork 'File::Copy::Recursive';
use prefork 'File::Remove';
use vars qw{$VERSION $errstr %modes $AUTO_PRUNE};
diff --git a/t/01_main.t b/t/01_main.t
index 7fbfb64..f9ff188 100644
--- a/t/01_main.t
+++ b/t/01_main.t
@@ -12,9 +12,10 @@ use File::Find 'find';
# If we are root, some things we WANT to fail won't,
# and we'll have to skip some tests.
-use vars qw{$root};
+use vars qw{$root $win32};
BEGIN {
- $root = ($> == 0) ? 1 : 0;
+ $root = ($> == 0) ? 1 : 0;
+ $win32 = ($^O eq 'MSWin32') ? 1 : 0;
}
use Test::More tests => 269;
@@ -276,18 +277,21 @@ SKIP: {
}
# Test the static ->canExecute method
-ok( ! File::Flat->canExecute( $f{null} ), "Static ->canExecute returns false for missing file" );
-ok( ! File::Flat->canExecute( $f{rwx} ), "Static ->canExecute returns false for mode 000 file" );
-ok( ! File::Flat->canExecute( $f{Rwx} ), "Static ->canExecute returns false for mode 400 file" );
-ok( ! File::Flat->canExecute( $f{rWx} ), "Static ->canExecute returns false for mode 200 file" );
-ok( File::Flat->canExecute( $f{rwX} ), "Static ->canExecute returns true for mode 100 file" );
-ok( ! File::Flat->canExecute( $f{RWx} ), "Static ->canExecute returns false for mode 500 file" );
-ok( File::Flat->canExecute( $f{RwX} ), "Static ->canExecute returns true for mode 300 file" );
-ok( File::Flat->canExecute( $f{RWX} ), "Static ->canExecute returns true for mode 700 file" );
-ok( File::Flat->canExecute( $curdir ), "Static ->canExecute returns true for current directory" );
-ok( File::Flat->canExecute( $f{gooddir} ), "Static ->canExecute returns true for executable subdirectory" );
SKIP: {
- skip "Skipping tests known to fail for root", 1 if $root;
+ skip( "Skipping tests known to falsely fail on Win32", 11 ) if $win32;
+
+ ok( ! File::Flat->canExecute( $f{null} ), "Static ->canExecute returns false for missing file" );
+ ok( ! File::Flat->canExecute( $f{rwx} ), "Static ->canExecute returns false for mode 000 file" );
+ ok( ! File::Flat->canExecute( $f{Rwx} ), "Static ->canExecute returns false for mode 400 file" );
+ ok( ! File::Flat->canExecute( $f{rWx} ), "Static ->canExecute returns false for mode 200 file" );
+ ok( File::Flat->canExecute( $f{rwX} ), "Static ->canExecute returns true for mode 100 file" );
+ ok( ! File::Flat->canExecute( $f{RWx} ), "Static ->canExecute returns false for mode 500 file" );
+ ok( File::Flat->canExecute( $f{RwX} ), "Static ->canExecute returns true for mode 300 file" );
+ ok( File::Flat->canExecute( $f{RWX} ), "Static ->canExecute returns true for mode 700 file" );
+ ok( File::Flat->canExecute( $curdir ), "Static ->canExecute returns true for current directory" );
+ ok( File::Flat->canExecute( $f{gooddir} ), "Static ->canExecute returns true for executable subdirectory" );
+
+ skip( "Skipping tests known to falsely fail for root", 1 ) if $root;
ok( ! File::Flat->canExecute( $f{baddir} ), "Static ->canExecute returns false for unexecutable subdirectory" );
}