[SCM] Debian package checker branch, master, updated. 2.2.7-5-g83dc423
The following commit has been merged in the master branch:
commit 83dc42331bf5146fc134c6f9e2814d1fb8ec333a
Author: Russ Allbery <rra@debian.org>
Date: Mon Mar 9 22:01:26 2009 -0700
Add a Perl-style test suite and POD tests, fix errors
* lib/Lintian/Collect/Binary.pm:
+ [RA] Fix POD errors.
* lib/Lintian/Collect/Source.pm:
+ [RA] Fix POD errors.
* lib/Lintian/Command.pm:
+ [RA] Fix POD errors.
* t/runtests:
+ [RA] Add support for running test scripts under t/scripts via prove
(the standard Perl test harness).
Also add a new test script to syntax-check all POD documentation in lib.
diff --git a/debian/changelog b/debian/changelog
index de0ad3f..69d8c37 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -15,6 +15,16 @@ lintian (2.2.8) UNRELEASED; urgency=low
* lib/Dep.pm:
+ [RA] Remove, replaced with Lintian::Relation.
+ * lib/Lintian/Collect/Binary.pm:
+ + [RA] Fix POD errors.
+ * lib/Lintian/Collect/Source.pm:
+ + [RA] Fix POD errors.
+ * lib/Lintian/Command.pm:
+ + [RA] Fix POD errors.
+
+ * t/runtests:
+ + [RA] Add support for running test scripts under t/scripts via prove
+ (the standard Perl test harness).
-- Russ Allbery <rra@debian.org> Mon, 09 Mar 2009 20:31:24 -0700
diff --git a/lib/Lintian/Collect/Binary.pm b/lib/Lintian/Collect/Binary.pm
index 7145545..b1325cf 100644
--- a/lib/Lintian/Collect/Binary.pm
+++ b/lib/Lintian/Collect/Binary.pm
@@ -315,6 +315,8 @@ data in memory.
=head1 CLASS METHODS
+=over 4
+
=item new(PACKAGE)
Creates a new Lintian::Collect::Binary object. Currently, PACKAGE is
diff --git a/lib/Lintian/Collect/Source.pm b/lib/Lintian/Collect/Source.pm
index ec163e0..959245b 100644
--- a/lib/Lintian/Collect/Source.pm
+++ b/lib/Lintian/Collect/Source.pm
@@ -247,6 +247,8 @@ data in memory.
=head1 CLASS METHODS
+=over 4
+
=item new(PACKAGE)
Creates a new Lintian::Collect::Source object. Currently, PACKAGE is
@@ -310,8 +312,6 @@ object will be empty (always satisfied and implies nothing).
Any substvars in F<debian/control> will be represented in the returned
relation as packages named after the substvar.
-=back
-
=item changelog()
Returns the changelog of the source package as a Parse::DebianChangelog
diff --git a/lib/Lintian/Command.pm b/lib/Lintian/Command.pm
index 4a07d1d..0292fea 100644
--- a/lib/Lintian/Command.pm
+++ b/lib/Lintian/Command.pm
@@ -233,7 +233,7 @@ sub spawn {
return $opts->{success};
}
-=head 2 C<reap($opts[, $opts[,...]])>
+=head2 C<reap($opts[, $opts[,...]])>
If you used one of the C<pipe_*> options to spawn() or used the shell-style "&"
operator to send the process to the background, you will need to wait for your
@@ -292,7 +292,7 @@ sub reap {
return $status;
}
-=head 2 C<kill($opts[, $opts[, ...]])>
+=head2 C<kill($opts[, $opts[, ...]])>
This is a simple wrapper around the kill_kill function. It doesn't allow
any customisation, but takes an $opts hash ref and SIGKILLs the process
diff --git a/t/runtests b/t/runtests
index 67891f3..995c506 100755
--- a/t/runtests
+++ b/t/runtests
@@ -271,6 +271,31 @@ for my $test (@tests) {
$tests_run++;
}
+# --- Run all test scripts
+
+$prev = $prev || scalar(@tests);
+@tests = ();
+if ($singletest) {
+ my $script = "$TESTSET/scripts/$singletest.t";
+ if (-f $script) {
+ @tests = ($script);
+ }
+} else {
+ unless (-d "$TESTSET/scripts") {
+ fail("cannot find $TESTSET/scripts: $!");
+ }
+ @tests = ("$TESTSET/scripts");
+}
+print "\n" if ($prev and @tests);
+if (@tests) {
+ print "Test scripts:\n";
+ if (system('prove', '-I', "$LINTIAN_ROOT/lib", @tests) != 0) {
+ exit 1 unless $run_all_tests;
+ $status = 1;
+ }
+ $tests_run++;
+}
+
# --- Check whether we ran any tests
if (!$tests_run) {
diff --git a/t/scripts/pod.t b/t/scripts/pod.t
new file mode 100755
index 0000000..bcce14f
--- /dev/null
+++ b/t/scripts/pod.t
@@ -0,0 +1,10 @@
+#!/usr/bin/perl
+#
+# Test POD formatting. Taken essentially verbatim from the examples in the
+# Test::Pod documentation.
+
+use strict;
+use Test::More;
+eval 'use Test::Pod 1.00';
+plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;
+all_pod_files_ok(all_pod_files("$ENV{LINTIAN_ROOT}/lib"));
--
Debian package checker
Reply to: