Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix #7: File::Find follows symlinks and Cwd's realpath resolves symli…
…nks. Now File::Spec->rel2abs is used instead.
- Loading branch information
Showing
3 changed files
with
42 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/usr/bin/perl | ||
|
||
use strict; | ||
use warnings; | ||
|
||
use Test::More; | ||
use Test::CheckManifest; | ||
use IO::File; | ||
use File::Basename; | ||
use File::Spec; | ||
|
||
SKIP: { | ||
skip 'Test not needed on Windows', 1 if $^O =~ /Win32/; | ||
|
||
{ | ||
my $dir = dirname( File::Spec->rel2abs( __FILE__ ) ); | ||
|
||
# create file | ||
my $fh_manifest = IO::File->new( $dir . '/MANIFEST', 'w' ); | ||
$fh_manifest->print( $_ . "\n" ) for (qw/MANIFEST A.txt B.txt 02_issue1.t 03_issue7.t/); | ||
$fh_manifest->close or die $!; | ||
|
||
# create file | ||
my $fh = IO::File->new( $dir . '/A.txt', 'w' ); | ||
$fh->print( scalar localtime ) or die $!; | ||
$fh->close or die $!; | ||
|
||
# create symlink | ||
eval { symlink $dir . '/A.txt', $dir . '/B.txt' }; | ||
|
||
ok_manifest({ dir => $dir }); | ||
} | ||
|
||
} |