From: Nicholas Clark Date: Sat, 30 Oct 2004 22:49:18 +0000 (+0000) Subject: Skip tests that require Data::Dumper if it is not built X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2799c20625244ac22c03fd0109d9df2488876338;hp=54b118e450a05696efa125aa6f95e265900e5b61;p=p5sagit%2Fp5-mst-13.2.git Skip tests that require Data::Dumper if it is not built p4raw-id: //depot/perl@23437 --- diff --git a/ext/B/t/f_map.t b/ext/B/t/f_map.t index ff22dde..dd5b732 100644 --- a/ext/B/t/f_map.t +++ b/ext/B/t/f_map.t @@ -8,6 +8,12 @@ BEGIN { print "1..0 # Skip -- Perl configured without B module\n"; exit 0; } + if ($Config{'extensions'} !~ /\bData\/Dumper\b/) { + print + "1..0 # Skip: Data::Dumper was not built, needed by OptreeCheck\n"; + exit 0; + + } if (!$Config::Config{useperlio}) { print "1..0 # Skip -- need perlio to walk the optree\n"; exit 0; diff --git a/ext/B/t/f_sort.t b/ext/B/t/f_sort.t index 26dfbe4..8abd070 100644 --- a/ext/B/t/f_sort.t +++ b/ext/B/t/f_sort.t @@ -12,6 +12,12 @@ BEGIN { print "1..0 # Skip -- need perlio to walk the optree\n"; exit 0; } + if ($Config{'extensions'} !~ /\bData\/Dumper\b/) { + print + "1..0 # Skip: Data::Dumper was not built, needed by OptreeCheck\n"; + exit 0; + + } if ($] < 5.009) { print "1..0 # Skip -- TODO - provide golden result regexps for 5.8\n"; exit 0; diff --git a/ext/B/t/optree_check.t b/ext/B/t/optree_check.t index c71cd7e..e9f6d1e 100644 --- a/ext/B/t/optree_check.t +++ b/ext/B/t/optree_check.t @@ -8,6 +8,12 @@ BEGIN { print "1..0 # Skip -- Perl configured without B module\n"; exit 0; } + if ($Config{'extensions'} !~ /\bData\/Dumper\b/) { + print + "1..0 # Skip: Data::Dumper was not built, needed by OptreeCheck\n"; + exit 0; + + } require './test.pl'; } diff --git a/ext/B/t/optree_concise.t b/ext/B/t/optree_concise.t index 856f4c6..cecc572 100644 --- a/ext/B/t/optree_concise.t +++ b/ext/B/t/optree_concise.t @@ -8,6 +8,12 @@ BEGIN { print "1..0 # Skip -- Perl configured without B module\n"; exit 0; } + if ($Config{'extensions'} !~ /\bData\/Dumper\b/) { + print + "1..0 # Skip: Data::Dumper was not built, needed by OptreeCheck\n"; + exit 0; + + } require './test.pl'; } diff --git a/ext/B/t/optree_samples.t b/ext/B/t/optree_samples.t index c51eeae..cfdbeaf 100644 --- a/ext/B/t/optree_samples.t +++ b/ext/B/t/optree_samples.t @@ -8,6 +8,12 @@ BEGIN { print "1..0 # Skip -- Perl configured without B module\n"; exit 0; } + if ($Config{'extensions'} !~ /\bData\/Dumper\b/) { + print + "1..0 # Skip: Data::Dumper was not built, needed by OptreeCheck\n"; + exit 0; + + } if ($] < 5.009) { print "1..0 # Skip -- TODO - provide golden result regexps for 5.8\n"; exit 0; diff --git a/ext/B/t/optree_sort.t b/ext/B/t/optree_sort.t index b7615d9..36ddc54 100644 --- a/ext/B/t/optree_sort.t +++ b/ext/B/t/optree_sort.t @@ -8,6 +8,12 @@ BEGIN { print "1..0 # Skip -- Perl configured without B module\n"; exit 0; } + if ($Config{'extensions'} !~ /\bData\/Dumper\b/) { + print + "1..0 # Skip: Data::Dumper was not built, needed by OptreeCheck\n"; + exit 0; + + } require './test.pl'; } use OptreeCheck; diff --git a/ext/B/t/optree_specials.t b/ext/B/t/optree_specials.t index 75d2a8a..b9eec16 100644 --- a/ext/B/t/optree_specials.t +++ b/ext/B/t/optree_specials.t @@ -8,6 +8,12 @@ BEGIN { print "1..0 # Skip -- Perl configured without B module\n"; exit 0; } + if ($Config{'extensions'} !~ /\bData\/Dumper\b/) { + print + "1..0 # Skip: Data::Dumper was not built, needed by OptreeCheck\n"; + exit 0; + + } require './test.pl'; } diff --git a/ext/B/t/optree_varinit.t b/ext/B/t/optree_varinit.t index 51cd9e7..f70854e 100644 --- a/ext/B/t/optree_varinit.t +++ b/ext/B/t/optree_varinit.t @@ -8,6 +8,11 @@ BEGIN { print "1..0 # Skip -- Perl configured without B module\n"; exit 0; } + if ($Config{'extensions'} !~ /\bData\/Dumper\b/) { + print + "1..0 # Skip: Data::Dumper was not built, needed by OptreeCheck\n"; + exit 0; + } require './test.pl'; } use OptreeCheck; diff --git a/lib/ExtUtils/t/Liblist.t b/lib/ExtUtils/t/Liblist.t index 0ee90be..2708716 100644 --- a/lib/ExtUtils/t/Liblist.t +++ b/lib/ExtUtils/t/Liblist.t @@ -4,6 +4,11 @@ BEGIN { if( $ENV{PERL_CORE} ) { chdir 't' if -d 't'; unshift @INC, '../lib'; + require Config; import Config; + if ($Config{'extensions'} !~ /\bData\/Dumper\b/) { + print "1..0 # Skip: Data::Dumper was not built\n"; + exit 0; + } } else { unshift @INC, 't/lib'; diff --git a/lib/ExtUtils/t/prereq_print.t b/lib/ExtUtils/t/prereq_print.t index 05790e5..42c0213 100644 --- a/lib/ExtUtils/t/prereq_print.t +++ b/lib/ExtUtils/t/prereq_print.t @@ -4,6 +4,11 @@ BEGIN { if( $ENV{PERL_CORE} ) { chdir 't' if -d 't'; @INC = ('../lib', 'lib'); + require Config; import Config; + if ($Config{'extensions'} !~ /\bData\/Dumper\b/) { + print "1..0 # Skip: Data::Dumper was not built\n"; + exit 0; + } } else { unshift @INC, 't/lib';