[Module-build-checkins] Module-Build/t metadata.t,1.4,1.5
Status: Beta
Brought to you by:
kwilliams
|
From: Randy W. S. <si...@us...> - 2005-07-28 07:53:44
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18730/t Modified Files: metadata.t Log Message: Correct some tests (t/metadata.t) where specific attributes cannot be detected because it depends on the order in which files are examined, i.e. it is unpredictable. Index: metadata.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/metadata.t,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- metadata.t 16 Jul 2005 03:54:28 -0000 1.4 +++ metadata.t 28 Jul 2005 07:53:32 -0000 1.5 @@ -3,7 +3,7 @@ use lib 't/lib'; use strict; -use Test::More tests => 33; +use Test::More tests => 35; use File::Spec (); @@ -326,8 +326,8 @@ --- $dist->regen( clean => 1 ); $mb = Module::Build->new_from_context; -is_deeply($mb->find_dist_packages, - {'Foo' => { file => 'lib/Simple.pm' }}); +$provides = $mb->find_dist_packages; +ok( exists( $provides->{Foo} ) ); # it exist, can't predict which file $dist->remove_file( 'lib/Simple2.pm' ); @@ -384,9 +384,8 @@ $dist->regen( clean => 1 ); $mb = Module::Build->new_from_context; $err = stderr_of( sub { $provides = $mb->find_dist_packages } ); -is_deeply($provides, - {'Foo' => { file => 'lib/Simple.pm', - version => '1.23' }}); +# XXX Should 'Foo' exist ??? Can't predict values for file & version +ok( exists( $provides->{Foo} ) ); like( $err, qr/Found conflicting versions for package/, ' with conflicting versions reported' ); $dist->remove_file( 'lib/Simple2.pm' ); @@ -407,9 +406,9 @@ $dist->regen( clean => 1 ); $mb = Module::Build->new_from_context; $err = stderr_of( sub { $provides = $mb->find_dist_packages } ); -is_deeply($provides, - {'Foo' => { file => 'lib/Simple.pm', - version => '1.23' }}); +ok( exists( $provides->{Foo} ) ); +is( $provides->{Foo}{version}, '1.23' ); +ok( exists( $provides->{Foo}{file} ) ); # Can't predict which file is( $err, '', ' no conflicts reported' ); $dist->remove_file( 'lib/Simple2.pm' ); |