[Reproducible-commits] [dpkg] 62/74: test: Add new synopsis 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 8a74ef70c07aa4d3abadda13f259322145c12e53
Author: Guillem Jover <guillem at debian.org>
Date: Thu Jun 16 20:22:24 2016 +0200
test: Add new synopsis unit test
Make sure all SYNOPSIS sections have compilable code.
---
Makefile.am | 1 +
README | 1 +
debian/changelog | 1 +
t/synopsis.t | 32 ++++++++++++++++++++++++++++++++
4 files changed, 35 insertions(+)
diff --git a/Makefile.am b/Makefile.am
index 6cfb0a2..5f96cee 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -146,6 +146,7 @@ endif
test_scripts = \
t/pod.t \
t/pod-spell.t \
+ t/synopsis.t \
t/minimum-version.t \
t/syntax.t \
t/strict.t \
diff --git a/README b/README
index 17798ca..5607212 100644
--- a/README
+++ b/README
@@ -79,6 +79,7 @@ To run the test suite («make check»):
Test::Pod perl module (optional)
Test::Spelling perl module (optional, author)
Test::Strict perl module (optional)
+ Test::Synopsis perl module (optional, author)
Test::Perl::Critic perl module (optional, author)
aspell (optional, author)
aspell-en (optional, author)
diff --git a/debian/changelog b/debian/changelog
index 5c2cb03..84eb217 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -79,6 +79,7 @@ dpkg (1.18.8) UNRELEASED; urgency=medium
- 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.
+ - Add new synopsis 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/synopsis.t b/t/synopsis.t
new file mode 100644
index 0000000..99835b6
--- /dev/null
+++ b/t/synopsis.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::Synopsis');
+test_needs_srcdir_switch();
+
+my @files = Test::Dpkg::all_perl_files();
+
+plan tests => scalar @files;
+
+for my $file (@files) {
+ synopsis_ok($file);
+}
--
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