diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2002-02-04 23:09:07 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-02-04 23:22:28 +0000 |
commit | 6fecce66bf5da93daf0d8b2ef8093422a24df6a3 (patch) | |
tree | b913016f45fc145c6b565bcb1c0a98f00da0b774 /lib/File/Find/t/find.t | |
parent | 9dbbe3891ce90facc5523d60b4d6ccb1aef29b75 (diff) | |
download | perl-6fecce66bf5da93daf0d8b2ef8093422a24df6a3.tar.gz |
File::Find tests not cleaning up properly
Message-ID: <20020204220907.A8288@rafael>
p4raw-id: //depot/perl@14554
Diffstat (limited to 'lib/File/Find/t/find.t')
-rw-r--r-- | lib/File/Find/t/find.t | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/lib/File/Find/t/find.t b/lib/File/Find/t/find.t index 0a84a0ed6f..c74a646439 100644 --- a/lib/File/Find/t/find.t +++ b/lib/File/Find/t/find.t @@ -64,23 +64,25 @@ my $FastFileTests_OK = 0; sub cleanup { if (-d dir_path('for_find')) { chdir(dir_path('for_find')); - if (-d dir_path('fa')) { - unlink file_path('fa', 'fa_ord'), - file_path('fa', 'fsl'), - file_path('fa', 'faa', 'faa_ord'), - file_path('fa', 'fab', 'fab_ord'), - file_path('fa', 'fab', 'faba', 'faba_ord'), - file_path('fb', 'fb_ord'), - file_path('fb', 'fba', 'fba_ord'); - rmdir dir_path('fa', 'faa'); - rmdir dir_path('fa', 'fab', 'faba'); - rmdir dir_path('fa', 'fab'); - rmdir dir_path('fa'); - rmdir dir_path('fb', 'fba'); - rmdir dir_path('fb'); - } - chdir(File::Spec->updir); - rmdir dir_path('for_find'); + } + if (-d dir_path('fa')) { + unlink file_path('fa', 'fa_ord'), + file_path('fa', 'fsl'), + file_path('fa', 'faa', 'faa_ord'), + file_path('fa', 'fab', 'fab_ord'), + file_path('fa', 'fab', 'faba', 'faba_ord'), + file_path('fb', 'fb_ord'), + file_path('fb', 'fba', 'fba_ord'); + rmdir dir_path('fa', 'faa'); + rmdir dir_path('fa', 'fab', 'faba'); + rmdir dir_path('fa', 'fab'); + rmdir dir_path('fa'); + rmdir dir_path('fb', 'fba'); + rmdir dir_path('fb'); + } + chdir(File::Spec->updir); + if (-d dir_path('for_find')) { + rmdir dir_path('for_find') or print "# Can't rmdir for_find: $!\n"; } } |