[Reproducible-commits] [strip-nondeterminism] 04/05: Replace t/javadoc.t with 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 b2b708cddffc29c698835129af32bb54c3dbf87d
Author: Chris Lamb <lamby at debian.org>
Date: Sun Jul 24 16:40:46 2016 +0100
Replace t/javadoc.t with fixture
Signed-off-by: Chris Lamb <lamby at debian.org>
---
t/fixtures/javadoc/a.in.html | 8 +++++
t/fixtures/javadoc/a.out.html | 7 ++++
t/javadoc.t | 81 -------------------------------------------
3 files changed, 15 insertions(+), 81 deletions(-)
diff --git a/t/fixtures/javadoc/a.in.html b/t/fixtures/javadoc/a.in.html
new file mode 100644
index 0000000..446cadc
--- /dev/null
+++ b/t/fixtures/javadoc/a.in.html
@@ -0,0 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
+<!-- NewPage -->
+<html lang="fr">
+<head>
+<!-- Generated by javadoc (1.8.0_20) on Mon Oct 27 21:31:13 GMT 2014 -->
+<title>Generated Documentation (Untitled)</title>
+<meta name="date" content="2014-10-27">
+<script type="text/javascript">;
diff --git a/t/fixtures/javadoc/a.out.html b/t/fixtures/javadoc/a.out.html
new file mode 100644
index 0000000..0fabadd
--- /dev/null
+++ b/t/fixtures/javadoc/a.out.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
+<!-- NewPage -->
+<html>
+<head>
+<title>Generated Documentation (Untitled)</title>
+<meta name="date" content="2015-02-05">
+<script type="text/javascript">;
diff --git a/t/javadoc.t b/t/javadoc.t
deleted file mode 100644
index c91dcf2..0000000
--- a/t/javadoc.t
+++ /dev/null
@@ -1,81 +0,0 @@
-#!perl
-
-#
-# Copyright 2014 Chris West (Faux)
-#
-# 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 => 3;
-use File::StripNondeterminism;
-
-my $dir = tempdir( CLEANUP => 1 );
-my $path1 = "$dir/a.html";
-my $path2 = "$dir/b.html";
-my $original = <<'ORIGINAL';
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
-<!-- NewPage -->
-<html lang="fr">
-<head>
-<!-- Generated by javadoc (1.8.0_20) on Mon Oct 27 21:31:13 GMT 2014 -->
-<title>Generated Documentation (Untitled)</title>
-<meta name="date" content="2014-10-27">
-<script type="text/javascript">;
-ORIGINAL
-
-for my $path ($path1, $path2) {
- open(my $fh, '>', $path) or die("error opening $path");
- binmode $fh;
- print $fh $original;
- close $fh;
-}
-
-# Test 1: make sure normalizer was found
-my $normalizer = File::StripNondeterminism::get_normalizer_for_file($path1);
-isnt(undef, $normalizer);
-
-# Test 2: normalize without a canonical time
-$normalizer->($path1);
-
-open(my $fh, '<', $path1) or die("error opening $path1");
-binmode $fh;
-is(do { local $/; <$fh> }, <<'EXPECTED');
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
-<!-- NewPage -->
-<html>
-<head>
-<title>Generated Documentation (Untitled)</title>
-<script type="text/javascript">;
-EXPECTED
-close $fh;
-
-# Test 3: normalize with a canonical time
-$File::StripNondeterminism::canonical_time = 1423159771;
-$normalizer->($path2);
-
-open($fh, '<', $path2) or die("error opening $path2");
-binmode $fh;
-is(do { local $/; <$fh> }, <<'EXPECTED');
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
-<!-- NewPage -->
-<html>
-<head>
-<title>Generated Documentation (Untitled)</title>
-<meta name="date" content="2015-02-05">
-<script type="text/javascript">;
-EXPECTED
-close $fh;
--
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