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=75d2a8ab1a0e1fb5c9cfe11098e4e3389c78c403;hpb=9cd8f8571248133e4de95e0188070c0cef2693b6;p=p5sagit%2Fp5-mst-13.2.git diff --git a/ext/B/t/optree_specials.t b/ext/B/t/optree_specials.t index 75d2a8a..dda1adc 100644 --- a/ext/B/t/optree_specials.t +++ b/ext/B/t/optree_specials.t @@ -1,14 +1,24 @@ #!./perl BEGIN { - chdir 't'; - @INC = ('../lib', '../ext/B/t'); + 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; } - require './test.pl'; + 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)