r66458 - in /trunk/dh-make-perl: debian/changelog t/AptContents.t t/core-modules.t t/perl-deps.t

dmn at users.alioth.debian.org dmn at users.alioth.debian.org
Sun Dec 26 12:36:28 UTC 2010


Author: dmn
Date: Sun Dec 26 12:36:14 2010
New Revision: 66458

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=66458
Log:
Fix tests to stringify when comparing overloaded objects with strings

Modified:
    trunk/dh-make-perl/debian/changelog
    trunk/dh-make-perl/t/AptContents.t
    trunk/dh-make-perl/t/core-modules.t
    trunk/dh-make-perl/t/perl-deps.t

Modified: trunk/dh-make-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/debian/changelog?rev=66458&op=diff
==============================================================================
--- trunk/dh-make-perl/debian/changelog (original)
+++ trunk/dh-make-perl/debian/changelog Sun Dec 26 12:36:14 2010
@@ -27,6 +27,7 @@
   * Clarify documentation about --cpan argument being module name
     (Closes: 602059)
   * Support distribution names as arguments to --cpan (Closes: #607998)
+  * Fix tests to stringify when comparing overloaded objects with strings
 
  -- Peter Pentchev <roam at ringlet.net>  Sun, 19 Dec 2010 20:43:10 +0200
 

Modified: trunk/dh-make-perl/t/AptContents.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/t/AptContents.t?rev=66458&op=diff
==============================================================================
--- trunk/dh-make-perl/t/AptContents.t (original)
+++ trunk/dh-make-perl/t/AptContents.t Sun Dec 26 12:36:14 2010
@@ -107,7 +107,8 @@
     [ 'libmoose-perl' ],
     'Moose found by find_file_packages' );
 
-is( $apt_contents->find_perl_module_package('Moose'), 'libmoose-perl', 'Moose fund by module name' );
+is( $apt_contents->find_perl_module_package('Moose') . '',
+    'libmoose-perl', 'Moose fund by module name' );
 
 is_deeply(
     $apt_contents->get_contents_files,
@@ -122,7 +123,7 @@
     "GD.pm is in libdg-gd2[-noxpm]-perl"
 );
 
-is( $apt_contents->find_perl_module_package('GD'),
+is( $apt_contents->find_perl_module_package('GD') . '',
     'libgd-gd2-noxpm-perl | libgd-gd2-perl',
     'Alternative dependency for module found in multiple packages'
 );

Modified: trunk/dh-make-perl/t/core-modules.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/t/core-modules.t?rev=66458&op=diff
==============================================================================
--- trunk/dh-make-perl/t/core-modules.t (original)
+++ trunk/dh-make-perl/t/core-modules.t Sun Dec 26 12:36:14 2010
@@ -7,15 +7,21 @@
 
 use DhMakePerl::Utils qw(find_core_perl_dependency);
 
-is( find_core_perl_dependency('Module::CoreList'), 'perl (>= 5.10.0)',
-    'Module::CoreList is in 5.10' );
+is( find_core_perl_dependency('Module::CoreList') . '',
+    'perl (>= 5.10.0)',
+    'Module::CoreList is in 5.10'
+);
 
-is( find_core_perl_dependency( 'Module::CoreList', '2.12' ), 'perl (>= 5.10.0)',
-    'Module::CoreList 2.12 is in 5.10' );
+is( find_core_perl_dependency( 'Module::CoreList', '2.12' ) . '',
+    'perl (>= 5.10.0)',
+    'Module::CoreList 2.12 is in 5.10'
+);
 
 # 2.17 is in 5.10.1, which is not in Debian
-is( find_core_perl_dependency( 'Module::CoreList', '2.17' ), 'perl (>= 5.10.1)',
-    'Module::CoreList 2.17 is in 5.10.1' );
+is( find_core_perl_dependency( 'Module::CoreList', '2.17' ) . '',
+    'perl (>= 5.10.1)',
+    'Module::CoreList 2.17 is in 5.10.1'
+);
 
 # try with an impossibly high version that should never exist
 is( find_core_perl_dependency( 'Module::CoreList', '999999.9' ), undef,

Modified: trunk/dh-make-perl/t/perl-deps.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/t/perl-deps.t?rev=66458&op=diff
==============================================================================
--- trunk/dh-make-perl/t/perl-deps.t (original)
+++ trunk/dh-make-perl/t/perl-deps.t Sun Dec 26 12:36:14 2010
@@ -18,18 +18,32 @@
     $ctl->prune_simple_perl_dep( $dep->new('perl|perl-modules') )
 } 'prune_simple_perl_dep croaks on alternatives';
 
-is( $ctl->prune_perl_dep( $dep->new('perl-modules (>= 5.10)') ), 'perl (>= 5.10)', 'perl-modules is converted to perl' );
+is( $ctl->prune_perl_dep( $dep->new('perl-modules (>= 5.10)') ) . '',
+    'perl (>= 5.10)',
+    'perl-modules is converted to perl'
+);
 
-is( $ctl->prune_perl_dep( $dep->new('perl-modules (>= 5.10)|foo') ), 'perl (>= 5.10) | foo', 'perl-modules is converted to perl in alternatives' );
+is( $ctl->prune_perl_dep( $dep->new('perl-modules (>= 5.10)|foo') ) . '',
+    'perl (>= 5.10) | foo',
+    'perl-modules is converted to perl in alternatives'
+);
 
-is( $ctl->prune_perl_dep( $dep->new('perl-base') ), undef, 'plain dependency on perl-base is redundant' );
+is( $ctl->prune_perl_dep( $dep->new('perl-base') ),
+    undef, 'plain dependency on perl-base is redundant' );
 
-is( $ctl->prune_perl_dep( $dep->new('perl'), 1 ), 'perl', 'perl is not build-essential' );
+is( $ctl->prune_perl_dep( $dep->new('perl'), 1 ) . '',
+    'perl', 'perl is not build-essential' );
 
-is( $ctl->prune_perl_dep( $dep->new('perl-modules'), 1 ), 'perl', 'perl-modules is not build-essential' );
+is( $ctl->prune_perl_dep( $dep->new('perl-modules'), 1 ) . '',
+    'perl', 'perl-modules is not build-essential' );
 
-is( $ctl->prune_perl_dep( $dep->new('foo|perl-modules') ), undef, 'redundant alternative makes redundand the whole' );
+is( $ctl->prune_perl_dep( $dep->new('foo|perl-modules') ),
+    undef, 'redundant alternative makes redundand the whole' );
 
-is( $ctl->prune_perl_dep( $dep->new('perl (>= 5.8.0)') ), undef, 'perl 5.8.0 is ancient' );
+is( $ctl->prune_perl_dep( $dep->new('perl (>= 5.8.0)') ),
+    undef, 'perl 5.8.0 is ancient' );
 
-is( $ctl->prune_perl_dep( $dep->new('perl (= 5.8.0)') ), 'perl (= 5.8.0)', 'perl =5.8.0 is left intact' );
+is( $ctl->prune_perl_dep( $dep->new('perl (= 5.8.0)') ) . '',
+    'perl (= 5.8.0)',
+    'perl =5.8.0 is left intact'
+);




More information about the Pkg-perl-cvs-commits mailing list