X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FShell.t;h=b2d3d67aa05584a8711eb9dc509b3a9bb93c2fc6;hb=c798bd2165d7b5d59c62ab6330f7cf77ff8b09dd;hp=837f6aca88632ff5d2575efaa80da8dcb285f8a9;hpb=f62ce20a4126b1e303e2d4d0a5c1e049ef2cb0c2;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/Shell.t b/lib/Shell.t index 837f6ac..b2d3d67 100644 --- a/lib/Shell.t +++ b/lib/Shell.t @@ -1,5 +1,10 @@ #!./perl +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; +} + use Test::More tests => 4; BEGIN { use_ok('Shell'); } @@ -19,7 +24,7 @@ while ( -f $tmpfile ) $tmpfile++; } -END { -f $tmpfile && unlink $tmpfile }; +END { -f $tmpfile && (open STDERR, '>&SAVERR' and unlink $tmpfile) }; @@ -28,7 +33,8 @@ open(STDERR, ">$tmpfile"); xXx(); # Ok someone could have a program called this :( -ok( !(-s $tmpfile) ,'$Shell::capture_stderr'); +# On os2 the warning is on by default... +ok( ($^O eq 'os2' xor !(-s $tmpfile)) ,'$Shell::capture_stderr'); $Shell::capture_stderr = 0; #