Commit | Line | Data |
e940ddbb |
1 | #!./perl -w |
2 | |
3 | BEGIN { |
4 | chdir 't' if -d 't'; |
69026470 |
5 | @INC = qw(. ../lib); |
e940ddbb |
6 | } |
7 | |
444e39b5 |
8 | use Config; |
e940ddbb |
9 | |
69026470 |
10 | require "test.pl"; |
11 | plan(tests => 8); |
12 | |
e940ddbb |
13 | ok( binmode(STDERR), 'STDERR made binary' ); |
444e39b5 |
14 | if ($Config{useperlio}) { |
15 | ok( binmode(STDERR, ":unix"), ' with unix discipline' ); |
16 | } else { |
17 | ok(1, ' skip unix discipline for -Uuseperlio' ); |
18 | } |
e940ddbb |
19 | ok( binmode(STDERR, ":raw"), ' raw' ); |
20 | ok( binmode(STDERR, ":crlf"), ' and crlf' ); |
21 | |
22 | # If this one fails, we're in trouble. So we just bail out. |
23 | ok( binmode(STDOUT), 'STDOUT made binary' ) || exit(1); |
444e39b5 |
24 | if ($Config{useperlio}) { |
25 | ok( binmode(STDOUT, ":unix"), ' with unix discipline' ); |
26 | } else { |
27 | ok(1, ' skip unix discipline for -Uuseperlio' ); |
28 | } |
29 | ok( binmode(STDOUT, ":raw"), ' raw' ); |
30 | ok( binmode(STDOUT, ":crlf"), ' and crlf' ); |