From: Peter Rabbitson Date: Mon, 28 Sep 2015 06:21:16 +0000 (+0200) Subject: Make sure to exercise P::S::PP under t/10-pure-perl.t X-Git-Tag: 0.26~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=39dbc69b27dbf7800719b3e60a9042b9a1ae58f8;p=p5sagit%2Fnamespace-clean.git Make sure to exercise P::S::PP under t/10-pure-perl.t --- diff --git a/t/10-pure-perl.t b/t/10-pure-perl.t index 1bbfd6e..e624c0c 100644 --- a/t/10-pure-perl.t +++ b/t/10-pure-perl.t @@ -9,13 +9,18 @@ BEGIN { plan skip_all => "B::Hooks::EndOfScope ($INC{'B/Hooks/EndOfScope.pm'}) loaded before the test even started >.<" if $INC{'B/Hooks/EndOfScope.pm'}; + plan skip_all => "Package::Stash ($INC{'Package/Stash.pm'}) loaded before the test even started >.<" + if $INC{'Package/Stash.pm'}; + eval { require Variable::Magic } or plan skip_all => "PP tests already executed"; $ENV{B_HOOKS_ENDOFSCOPE_IMPLEMENTATION} = 'PP'; + $ENV{PACKAGE_STASH_IMPLEMENTATION} = 'PP'; } use B::Hooks::EndOfScope 0.12; +use Package::Stash; ok( ($INC{'B/Hooks/EndOfScope/PP.pm'} && ! $INC{'B/Hooks/EndOfScope/XS.pm'}), @@ -25,6 +30,14 @@ ok( qw|EndOfScope.pm EndOfScope/XS.pm EndOfScope/PP.pm| ; +ok( + ($INC{'Package/Stash/PP.pm'} && ! $INC{'Package/Stash/XS.pm'}), + 'PP Package::Stash loaded properly' +) || diag join "\n", + map { sprintf '%s => %s', $_, $INC{"Package/$_"} || 'undef' } + qw|Stash.pm Stash/XS.pm Stash/PP.pm| +; + use Config; use FindBin qw($Bin); use IPC::Open2 qw(open2);