[Reproducible-commits] [strip-nondeterminism] 02/05: Replace (single) pearregistry test with a fixture.
Chris Lamb
chris at chris-lamb.co.uk
Sun Jul 24 15:46:25 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 2dddd4d619e41229013ebbc1dbfdbe0dedc771fb
Author: Chris Lamb <lamby at debian.org>
Date: Sun Jul 24 16:25:34 2016 +0100
Replace (single) pearregistry test with a fixture.
---
t/fixtures/pearregistry/test.in.reg | 1 +
t/fixtures/pearregistry/test.out.reg | 1 +
t/pearregistry.t | 38 ------------------------------------
3 files changed, 2 insertions(+), 38 deletions(-)
diff --git a/t/fixtures/pearregistry/test.in.reg b/t/fixtures/pearregistry/test.in.reg
new file mode 100644
index 0000000..f00cbb3
--- /dev/null
+++ b/t/fixtures/pearregistry/test.in.reg
@@ -0,0 +1 @@
+a:1:{s:13:"_lastmodified";i:1422064771;}
diff --git a/t/fixtures/pearregistry/test.out.reg b/t/fixtures/pearregistry/test.out.reg
new file mode 100644
index 0000000..35ac0dc
--- /dev/null
+++ b/t/fixtures/pearregistry/test.out.reg
@@ -0,0 +1 @@
+a:1:{s:13:"_lastmodified";i:0;}
diff --git a/t/pearregistry.t b/t/pearregistry.t
deleted file mode 100644
index e4bbe76..0000000
--- a/t/pearregistry.t
+++ /dev/null
@@ -1,38 +0,0 @@
-#!perl
-
-#
-# Copyright 2015 Chris Lamb <lamby at debian.org>
-#
-# This file is part of strip-nondeterminism.
-#
-# strip-nondeterminism is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# strip-nondeterminism is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with strip-nondeterminism. If not, see <http://www.gnu.org/licenses/>.
-#
-
-use File::Temp 'tempdir';
-use Test::More tests => 2;
-use File::StripNondeterminism;
-
-$dir = tempdir( CLEANUP => 1 );
-$path = "$dir/test.reg";
-
-open(my $fh, '>', $path) or die("error opening $path");
-print $fh 'a:1:{s:13:"_lastmodified";i:1422064771;}';
-close $fh;
-
-$normalizer = File::StripNondeterminism::get_normalizer_for_file($path);
-isnt(undef, $normalizer);
-$normalizer->($path);
-
-open FILE,$path or die("error opening $path");
-is(<FILE>, 'a:1:{s:13:"_lastmodified";i:0;}');
--
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