X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=ext%2FB%2Ft%2Foptree_specials.t;h=dda1adcc3d5ccc77b1f7469fa6850dd5feae6e18;hb=5638aaacc9150fc0f24c4cbd2aba01385e12f1da;hp=72fff6688e3f3ed53821e8c2ca3b28000d7dac31;hpb=bc2a472ee2496e18323688445a703595a998e3a4;p=p5sagit%2Fp5-mst-13.2.git diff --git a/ext/B/t/optree_specials.t b/ext/B/t/optree_specials.t index 72fff66..dda1adc 100644 --- a/ext/B/t/optree_specials.t +++ b/ext/B/t/optree_specials.t @@ -1,9 +1,24 @@ #!./perl BEGIN { - chdir 't'; - @INC = ('../lib', '../ext/B/t'); - require './test.pl'; + if ($ENV{PERL_CORE}){ + chdir('t') if -d 't'; + @INC = ('.', '../lib', '../ext/B/t'); + } else { + unshift @INC, 't'; + push @INC, "../../t"; + } + require Config; + if (($Config::Config{'extensions'} !~ /\bB\b/) ){ + print "1..0 # Skip -- Perl configured without B module\n"; + exit 0; + } + if ($Config::Config{'extensions'} !~ /\bData\/Dumper\b/) { + print + "1..0 # Skip: Data::Dumper was not built, needed by OptreeCheck\n"; + exit 0; + } + require 'test.pl'; } # import checkOptree(), and %gOpts (containing test state)