[strip-nondeterminism] 01/02: Extend testsuite to ensure no extra files are leftover again.

Chris Lamb chris at chris-lamb.co.uk
Sun Sep 4 16:33:11 UTC 2016


This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository strip-nondeterminism.

commit 9f96609aa1ab13a4eba36d737581c149ad0f5291
Author: Chris Lamb <lamby at debian.org>
Date:   Sun Sep 4 17:31:17 2016 +0100

    Extend testsuite to ensure no extra files are leftover again.
---
 t/fixtures.t | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/t/fixtures.t b/t/fixtures.t
index 83112b0..b0a5795 100644
--- a/t/fixtures.t
+++ b/t/fixtures.t
@@ -29,13 +29,12 @@ use File::Temp qw(tempdir);
 use File::StripNondeterminism;
 use Test::More;
 
-my $temp = tempdir( CLEANUP => 1 );
-
 my @fixtures = glob('t/fixtures/*/*.in');
 
 $File::StripNondeterminism::canonical_time = 1423159771;
 
 foreach my $filename (@fixtures) {
+	my $temp = tempdir( CLEANUP => 1 );
 	my $in = "$temp/" . basename($filename, '.in');
 	(my $out = $filename) =~ s/\.in$/.out/;
 
@@ -61,6 +60,9 @@ foreach my $filename (@fixtures) {
 
 		ok(compare($in, $out) == 0, "Got expected output");
 
+		my @files = glob("$temp/*");
+		ok(scalar(@files) == 1, "Unexpected files leftover: " . join(" ", @files));
+
 		done_testing;
 	}
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/strip-nondeterminism.git



More information about the Reproducible-commits mailing list