X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FShell.t;h=c76628c4ce03905a605109332b6afad5dc4a5e25;hb=86f0d17ae7d22e132374646440ff37525d8d624b;hp=c7c45d3f2c27673e173e0738ab2d6ba4872bbe39;hpb=51947a20dc2d93fe0888ee6d69de8ae4aca4aef4;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/Shell.t b/lib/Shell.t index c7c45d3..c76628c 100644 --- a/lib/Shell.t +++ b/lib/Shell.t @@ -1,8 +1,10 @@ #!./perl BEGIN { - chdir 't' if -d 't'; - @INC = '../lib'; + if( $ENV{PERL_CORE} ) { + chdir 't' if -d 't'; + @INC = '../lib'; + } } use Test::More tests => 7; @@ -26,11 +28,13 @@ while ( -f $tmpfile ) { } END { -f $tmpfile && (open STDERR, '>&SAVERR' and unlink $tmpfile) } +no warnings 'once'; +# no false warning about Name "main::SAVERR" used only once: possible typo open(SAVERR, ">&STDERR"); open(STDERR, ">$tmpfile"); -xXx(); # Ok someone could have a program called this :( +xXx_not_there(); # Ok someone could have a program called this :( # On os2 the warning is on by default... ok(($^O eq 'os2' xor !(-s $tmpfile)), '$Shell::capture_stderr');