[strip-nondeterminism] 03/05: t/fixtures.t: Check that output matches expected before comparing attributes to make it less confusing on failure.

Chris Lamb chris at chris-lamb.co.uk
Fri Sep 9 09:56:26 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 a3210000245948e0471ec6aca93013992e033000
Author: Chris Lamb <lamby at debian.org>
Date:   Fri Sep 9 10:33:25 2016 +0100

    t/fixtures.t: Check that output matches expected before comparing attributes to make it less confusing on failure.
---
 t/fixtures.t | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/fixtures.t b/t/fixtures.t
index 16387e8..ca18f45 100644
--- a/t/fixtures.t
+++ b/t/fixtures.t
@@ -70,13 +70,13 @@ foreach my $filename (@fixtures) {
 		$normalizer->($in) if defined $normalizer;
 		my @stat_after = lstat $in;
 
+		ok(compare($in, $out) == 0, "Got expected output");
+
 		# Check that file attributes remain unchanged.
 		foreach my $i (sort keys %STAT) {
 			is($stat_before[$i], $stat_after[$i], "$filename: $STAT{$i}");
 		}
 
-		ok(compare($in, $out) == 0, "Got expected output");
-
 		my @files = glob("$temp/*");
 		ok(scalar(@files) == 1, "Unexpected files leftover: " . join(" ", @files));
 

-- 
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