Update of /cvsroot/module-build/Module-Build/t
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8198/t
Modified Files:
extend.t
Log Message:
Modify add_build_element() so that it only adds elements if they don't already exist.
Index: extend.t
===================================================================
RCS file: /cvsroot/module-build/Module-Build/t/extend.t,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- extend.t 9 Jan 2006 01:18:15 -0000 1.22
+++ extend.t 25 Feb 2006 03:51:28 -0000 1.23
@@ -2,7 +2,7 @@
use strict;
use lib $ENV{PERL_CORE} ? '../lib/Module/Build/t/lib' : 't/lib';
-use MBTest tests => 52;
+use MBTest tests => 53;
use Cwd ();
my $cwd = Cwd::cwd;
@@ -78,6 +78,10 @@
ok $mb;
$mb->add_build_element('foo');
+ $mb->add_build_element('foo');
+ is_deeply $mb->build_elements, [qw(PL support pm xs pod script foo)],
+ 'The foo element should be in build_elements only once';
+
$mb->dispatch('build');
ok -e File::Spec->catfile($mb->blib, 'lib', 'test.foo');
|