summaryrefslogtreecommitdiff
path: root/t/io/binmode.t
diff options
context:
space:
mode:
Diffstat (limited to 't/io/binmode.t')
-rw-r--r--t/io/binmode.t14
1 files changed, 12 insertions, 2 deletions
diff --git a/t/io/binmode.t b/t/io/binmode.t
index 3775290bf5..f50d0f7fa8 100644
--- a/t/io/binmode.t
+++ b/t/io/binmode.t
@@ -3,12 +3,13 @@
BEGIN {
chdir 't' if -d 't';
@INC = qw(. ../lib);
+ require './test.pl';
}
use Config;
+use Errno;
-require "test.pl";
-plan(tests => 8);
+plan(tests => 9);
ok( binmode(STDERR), 'STDERR made binary' );
if (find PerlIO::Layer 'perlio') {
@@ -28,3 +29,12 @@ if (find PerlIO::Layer 'perlio') {
}
ok( binmode(STDOUT, ":raw"), ' raw' );
ok( binmode(STDOUT, ":crlf"), ' and crlf' );
+
+SKIP: {
+ skip "no EBADF", 1 if (!exists &Errno::EBADF);
+
+ no warnings 'io';
+ $! = 0;
+ binmode(B);
+ ok($! == &Errno::EBADF);
+}