Commit d8be2f31 authored by Chris Lamb's avatar Chris Lamb 💬

Merge tag '0.025' into debian

Release 0.025

* tag '0.025':
  Release 0.025
  Drop all calls to unlink_on_destroy now that we copy the file. (Closes: #836670)
  Extend testsuite to ensure no extra files are leftover again.
parents 1aa38f63 f0cdd3c3
...@@ -33,7 +33,7 @@ use File::StripNondeterminism::handlers::zip; ...@@ -33,7 +33,7 @@ use File::StripNondeterminism::handlers::zip;
our($VERSION, $canonical_time, $clamp_time); our($VERSION, $canonical_time, $clamp_time);
$VERSION = '0.024'; # 0.024 $VERSION = '0.025'; # 0.025
sub _get_file_type { sub _get_file_type {
my $file=shift; my $file=shift;
......
...@@ -128,7 +128,6 @@ sub normalize { ...@@ -128,7 +128,6 @@ sub normalize {
$tempfile->close; $tempfile->close;
copy_data($tempfile->filename, $filename) copy_data($tempfile->filename, $filename)
or die "$filename: unable to overwrite: copy_data: $!"; or die "$filename: unable to overwrite: copy_data: $!";
$tempfile->unlink_on_destroy(0);
return 1; return 1;
} }
......
...@@ -61,7 +61,6 @@ sub _jar_normalize_manifest { ...@@ -61,7 +61,6 @@ sub _jar_normalize_manifest {
$tempfile->close; $tempfile->close;
copy_data($tempfile->filename, $filename) copy_data($tempfile->filename, $filename)
or die "$filename: unable to overwrite: copy_data: $!"; or die "$filename: unable to overwrite: copy_data: $!";
$tempfile->unlink_on_destroy(0);
} }
return $modified; return $modified;
} }
......
...@@ -84,7 +84,6 @@ sub normalize { ...@@ -84,7 +84,6 @@ sub normalize {
$tempfile->close; $tempfile->close;
copy_data($tempfile->filename, $filename) copy_data($tempfile->filename, $filename)
or die "$filename: unable to overwrite: copy_data: $!"; or die "$filename: unable to overwrite: copy_data: $!";
$tempfile->unlink_on_destroy(0);
return 1; return 1;
} }
......
...@@ -67,7 +67,6 @@ sub normalize { ...@@ -67,7 +67,6 @@ sub normalize {
$tempfile->close; $tempfile->close;
copy_data($tempfile->filename, $filename) copy_data($tempfile->filename, $filename)
or die "$filename: unable to overwrite: copy_data: $!"; or die "$filename: unable to overwrite: copy_data: $!";
$tempfile->unlink_on_destroy(0);
return 1; return 1;
} }
print $tempfile $line; print $tempfile $line;
......
...@@ -57,7 +57,6 @@ sub normalize { ...@@ -57,7 +57,6 @@ sub normalize {
$tempfile->close; $tempfile->close;
copy_data($tempfile->filename, $filename) copy_data($tempfile->filename, $filename)
or die "$filename: unable to overwrite: copy_data: $!"; or die "$filename: unable to overwrite: copy_data: $!";
$tempfile->unlink_on_destroy(0);
} }
return $modified; return $modified;
......
...@@ -59,7 +59,6 @@ sub normalize { ...@@ -59,7 +59,6 @@ sub normalize {
$tempfile->close; $tempfile->close;
copy_data($tempfile->filename, $filename) copy_data($tempfile->filename, $filename)
or die "$filename: unable to overwrite: copy_data: $!"; or die "$filename: unable to overwrite: copy_data: $!";
$tempfile->unlink_on_destroy(0);
} }
close $fh; close $fh;
......
...@@ -29,13 +29,12 @@ use File::Temp qw(tempdir); ...@@ -29,13 +29,12 @@ use File::Temp qw(tempdir);
use File::StripNondeterminism; use File::StripNondeterminism;
use Test::More; use Test::More;
my $temp = tempdir( CLEANUP => 1 );
my @fixtures = glob('t/fixtures/*/*.in'); my @fixtures = glob('t/fixtures/*/*.in');
$File::StripNondeterminism::canonical_time = 1423159771; $File::StripNondeterminism::canonical_time = 1423159771;
foreach my $filename (@fixtures) { foreach my $filename (@fixtures) {
my $temp = tempdir( CLEANUP => 1 );
my $in = "$temp/" . basename($filename, '.in'); my $in = "$temp/" . basename($filename, '.in');
(my $out = $filename) =~ s/\.in$/.out/; (my $out = $filename) =~ s/\.in$/.out/;
...@@ -61,6 +60,9 @@ foreach my $filename (@fixtures) { ...@@ -61,6 +60,9 @@ foreach my $filename (@fixtures) {
ok(compare($in, $out) == 0, "Got expected output"); ok(compare($in, $out) == 0, "Got expected output");
my @files = glob("$temp/*");
ok(scalar(@files) == 1, "Unexpected files leftover: " . join(" ", @files));
done_testing; done_testing;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment