[Reproducible-commits] [dpkg] 60/74: test: Add new minimum perl version unit test

Mattia Rizzolo mattia at debian.org
Sun Jul 3 22:22:58 UTC 2016


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

mattia pushed a commit to annotated tag 1.18.8
in repository dpkg.

commit fdb17ae55adb26240a5a192a1afae174eeffb7b3
Author: Guillem Jover <guillem at debian.org>
Date:   Thu Jun 16 20:19:59 2016 +0200

    test: Add new minimum perl version unit test
    
    Verify that the perl version we want to restrict ourselves in the coding
    style is enforced through the test suite.
---
 Makefile.am         |  1 +
 README              |  1 +
 debian/changelog    |  1 +
 t/minimum-version.t | 32 ++++++++++++++++++++++++++++++++
 4 files changed, 35 insertions(+)

diff --git a/Makefile.am b/Makefile.am
index 62dc5e0..6cfb0a2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -146,6 +146,7 @@ endif
 test_scripts = \
 	t/pod.t \
 	t/pod-spell.t \
+	t/minimum-version.t \
 	t/syntax.t \
 	t/strict.t \
 	t/critic.t \
diff --git a/README b/README
index f9cdca1..17798ca 100644
--- a/README
+++ b/README
@@ -75,6 +75,7 @@ To enable optional functionality or programs, this software might be needed:
 To run the test suite («make check»):
 
   IO-String perl module
+  Test::MinimumVersion perl module (optional author)
   Test::Pod perl module (optional)
   Test::Spelling perl module (optional, author)
   Test::Strict perl module (optional)
diff --git a/debian/changelog b/debian/changelog
index 6b5c2e7..5dd290d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -78,6 +78,7 @@ dpkg (1.18.8) UNRELEASED; urgency=medium
     - Add new pod-spell unit test.
     - Refactor common unit test checks for needed things into Test::Dpkg.
     - Accept perl's Lancaster Consensus AUTHOR_TESTING variable.
+    - Add new minimum perl version unit test.
   * Documentation:
     - Improve dpkg-buildpackage(1) on environment expectations.
     - Clarify the format of the db:Status-Abbrev virtual field in
diff --git a/t/minimum-version.t b/t/minimum-version.t
new file mode 100644
index 0000000..df059d9
--- /dev/null
+++ b/t/minimum-version.t
@@ -0,0 +1,32 @@
+#!/usr/bin/perl
+#
+# This program 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 2 of the License, or
+# (at your option) any later version.
+#
+# This program 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 this program.  If not, see <https://www.gnu.org/licenses/>.
+
+use strict;
+use warnings;
+
+use Test::More;
+use Test::Dpkg qw(:needs);
+
+test_needs_author();
+test_needs_module('Test::MinimumVersion');
+test_needs_srcdir_switch();
+
+my @files = Test::Dpkg::all_perl_files();
+
+plan tests => scalar @files;
+
+for my $file (@files) {
+    minimum_version_ok($file, '5.14.2');
+}

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



More information about the Reproducible-commits mailing list