[Module-build-checkins] Module-Build/t xs.t,1.18,1.19
Status: Beta
Brought to you by:
kwilliams
|
From: Randy W. S. <si...@us...> - 2005-04-07 01:51:50
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23135/t Modified Files: xs.t Log Message: Make sure verbose output from Module::Build and test output from sub-tests are not picked up by Test::Harness. Index: xs.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/xs.t,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- xs.t 24 Mar 2005 01:44:34 -0000 1.18 +++ xs.t 7 Apr 2005 01:51:40 -0000 1.19 @@ -11,10 +11,13 @@ { local $SIG{__WARN__} = sub {}; + my $m = Module::Build->current; + $m->verbose( 0 ); + my $have_c_compiler; - stderr_of( sub {$have_c_compiler = Module::Build->current->have_c_compiler} ); + stderr_of( sub {$have_c_compiler = $m->have_c_compiler} ); - if ( !Module::Build->current->feature('C_support') ) { + if ( ! $m->feature('C_support') ) { print("1..0 # Skipped: C_support not enabled\n"); exit(0); } elsif ( !$have_c_compiler ) { @@ -23,15 +26,15 @@ } } -plan tests => 12; - ######################### End of black magic. +plan tests => 12; + # Pretend we're in the t/XSTest/ subdirectory my $build_dir = File::Spec->catdir('t','XSTest'); chdir $build_dir or die "Can't change to $build_dir : $!"; -my $m = Module::Build->new_from_context; +my $m = Module::Build->new_from_context('skip_rcfile' => '1'); ok(1); eval {$m->dispatch('clean')}; |