Author: dagolden
Date: Wed Sep  2 20:45:55 2009
New Revision: 13263

Modified:
   Module-Build/trunk/t/xs.t

Log:
fix broken xs testing

Modified: Module-Build/trunk/t/xs.t
==============================================================================
--- Module-Build/trunk/t/xs.t   (original)
+++ Module-Build/trunk/t/xs.t   Wed Sep  2 20:45:55 2009
@@ -21,7 +21,7 @@
   } elsif ( !$Config{usedl} ) {
     plan skip_all => 'Perl not compiled for dynamic loading'
   } else {
-    plan tests => 22;
+    plan tests => 20;
   }
   require Cwd;
   $tmp = MBTest->tmpdir( $tmp_exec ? undef : Cwd::cwd );
@@ -111,16 +111,15 @@
 $dist->reset( name => 'Simple::With::Deep::Name', dir => $tmp, xs => 1 );
 $dist->chdir_in->regen;
 
-$mb = Module::Build->new_from_context;
-is $@, '';
+$mb = $dist->new_from_context;
 
-$mb->dispatch('build');
+eval { $mb->dispatch('build') };
 is $@, '';
 
-$mb->dispatch('test');
+eval { $mb->dispatch('test') };
 is $@, '';
 
-$mb->dispatch('realclean');
+eval { $mb->dispatch('realclean') };
 is $@, '';
 
 ########################################
@@ -200,14 +199,13 @@
 $dist->regen;
 
 $mb = $dist->new_from_context;
-is $@, '';
 
-$mb->dispatch('build');
+eval { $mb->dispatch('build') };
 is $@, '';
 
-$mb->dispatch('test');
+stdout_of( sub { eval { $mb->dispatch('test') } } );
 is $@, '';
 
-$mb->dispatch('realclean');
+eval { $mb->dispatch('realclean') };
 is $@, '';
 

Reply via email to