X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fio%2Fbinmode.t;h=41eff4a24f4361de2e6ae1f6c009ca03eb062de8;hb=b88df9907a8d7b4fae1100629cc85633a901355e;hp=3775290bf5fbe40b4c3635601d06028c9a93de1c;hpb=6b5da1a3dd326d0fe0f59ec1ea7b9b5d72b2a49e;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/io/binmode.t b/t/io/binmode.t index 3775290..41eff4a 100644 --- a/t/io/binmode.t +++ b/t/io/binmode.t @@ -3,12 +3,14 @@ BEGIN { chdir 't' if -d 't'; @INC = qw(. ../lib); + require './test.pl'; } use Config; - -require "test.pl"; -plan(tests => 8); +BEGIN { + eval {require Errno; Errno->import;}; +} +plan(tests => 9); ok( binmode(STDERR), 'STDERR made binary' ); if (find PerlIO::Layer 'perlio') { @@ -28,3 +30,13 @@ if (find PerlIO::Layer 'perlio') { } ok( binmode(STDOUT, ":raw"), ' raw' ); ok( binmode(STDOUT, ":crlf"), ' and crlf' ); + +SKIP: { + skip "minitest", 1 if $ENV{PERL_CORE_MINITEST}; + skip "no EBADF", 1 if (!exists &Errno::EBADF); + + no warnings 'io', 'once'; + $! = 0; + binmode(B); + ok($! == &Errno::EBADF); +}