30 |
my $orig_size = -s "$to/$path"; |
my $orig_size = -s "$to/$path"; |
31 |
ok( open( my $fh, $op, "$to/$path" ), "open( $op $path )"); |
ok( open( my $fh, $op, "$to/$path" ), "open( $op $path )"); |
32 |
if ( $op eq '>' ) { |
if ( $op eq '>' ) { |
33 |
cmp_ok( -s "$to/$path", '==', 0, "truncate $to/$path" ); |
cmp_ok( -s "$to/$path", '==', 0, "truncated $to/$path" ); |
34 |
print $fh $content; |
print $fh $content; |
35 |
} elsif ( $op eq '>>' ) { |
} elsif ( $op eq '>>' ) { |
36 |
cmp_ok( -s "$to/$path", '==', $orig_size, "no truncate $to/$path" ); |
cmp_ok( -s "$to/$path", '==', $orig_size, "no truncate $to/$path" ); |
143 |
cmp_ok( (stat("$to/m"))[3], '==', 1, 'no links' ); |
cmp_ok( (stat("$to/m"))[3], '==', 1, 'no links' ); |
144 |
|
|
145 |
my @sizes; |
my @sizes; |
146 |
my $size = 65536; |
$size = 65536; |
147 |
while ( $size > 1 ) { |
while ( $size > 1 ) { |
148 |
push @sizes, $size; |
push @sizes, $size; |
149 |
$size /= 2; |
$size /= 2; |