Explorar o código

scripts/t: Skip the tests if IO::String is not present

This makes this dependency optional.
Guillem Jover %!s(int64=10) %!d(string=hai) anos
pai
achega
4f12a3b01b
Modificáronse 4 ficheiros con 14 adicións e 6 borrados
  1. 1 1
      README
  2. 1 0
      debian/changelog
  3. 6 3
      scripts/t/Dpkg_Control.t
  4. 6 2
      scripts/t/Dpkg_Shlibs.t

+ 1 - 1
README

@@ -75,7 +75,7 @@ To enable optional functionality or programs, this software might be needed:
 
 To run the test suite («make check»):
 
-  IO-String perl module
+  IO-String perl module (optional)
   Test::MinimumVersion perl module (optional author)
   Test::Pod perl module (optional)
   Test::Spelling perl module (optional, author)

+ 1 - 0
debian/changelog

@@ -136,6 +136,7 @@ dpkg (1.18.11) UNRELEASED; urgency=medium
     - Add new dpkg-source functional tests.
     - Add new dpkg-buildpackage functional tests.
     - Add an initial functional test suite for dpkg-deb and dpkg-split.
+    - Skip the involved tests if IO::String is missing.
   * Build system:
     - Add support for profiling perl modules.
     - Clean up compiler and linker automatic flag usage in configure.

+ 6 - 3
scripts/t/Dpkg_Control.t

@@ -16,11 +16,14 @@
 use strict;
 use warnings;
 
-use Test::More tests => 24;
-
-use IO::String;
+use Test::More;
+use Test::Dpkg qw(:needs);
 
 BEGIN {
+    test_needs_module('IO::String');
+
+    plan tests => 24;
+
     use_ok('Dpkg::Control');
     use_ok('Dpkg::Control::Info');
 }

+ 6 - 2
scripts/t/Dpkg_Shlibs.t

@@ -16,10 +16,14 @@
 use strict;
 use warnings;
 
-use Test::More tests => 148;
+use Test::More;
+use Test::Dpkg qw(:needs);
 
 use Cwd;
-use IO::String;
+
+test_needs_module('IO::String');
+
+plan tests => 148;
 
 use Dpkg::Path qw(find_command);