Update of /cvsroot/module-build/Module-Build/t
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26087/t
Modified Files:
xs.t
Log Message:
Test for have_c_compiler in addition to feature('C_support') since the feature can be enabled when the compiler is no longer present or can't be found in the PATH.
Index: xs.t
===================================================================
RCS file: /cvsroot/module-build/Module-Build/t/xs.t,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- xs.t 7 Jan 2005 10:15:54 -0000 1.16
+++ xs.t 24 Mar 2005 01:16:59 -0000 1.17
@@ -6,7 +6,16 @@
use Module::Build;
use File::Spec;
-print("1..0 # Skipped: C_support not enabled\n"), exit(0) unless Module::Build->current->feature('C_support');
+{ local $SIG{__WARN__} = sub {};
+ if ( !Module::Build->current->feature('C_support') ) {
+ print("1..0 # Skipped: C_support not enabled\n");
+ exit(0);
+ } elsif ( !Module::Build->current->have_c_compiler ) {
+ print("1..0 # Skipped: C_support enabled, but no compiler found\n");
+ exit(0);
+ }
+}
+
plan tests => 12;
my $common_pl = File::Spec->catfile('t', 'common.pl');
|