| 1 | #!/usr/bin/perl |
| 2 | |
| 3 | use strict; |
| 4 | use warnings; |
| 5 | |
| 6 | use Test::More; |
| 7 | use Test::CheckManifest; |
| 8 | use IO::File; |
| 9 | use File::Basename; |
| 10 | use File::Spec; |
| 11 | |
| 12 | SKIP: { |
| 13 | plan skip_all => 'Test not needed on Windows', 1 if $^O =~ /Win32/; |
| 14 | |
| 15 | { |
| 16 | my $dir = dirname( File::Spec->rel2abs( __FILE__ ) ); |
| 17 | |
| 18 | # create file |
| 19 | my $fh_manifest = IO::File->new( $dir . '/MANIFEST', 'w' ); |
| 20 | $fh_manifest->print( $_ . "\n" ) for (qw/MANIFEST A.txt B.txt 02_issue1.t 03_issue7.t/); |
| 21 | $fh_manifest->close or die $!; |
| 22 | |
| 23 | # create file |
| 24 | my $fh = IO::File->new( $dir . '/A.txt', 'w' ); |
| 25 | $fh->print( scalar localtime ) or die $!; |
| 26 | $fh->close or die $!; |
| 27 | |
| 28 | # create symlink |
| 29 | eval { symlink $dir . '/A.txt', $dir . '/B.txt' }; |
| 30 | |
| 31 | ok_manifest({ dir => $dir }); |
| 32 | } |
| 33 | |
| 34 | } |
| 35 |