AutoSplit.t (was Re: Untested libraries update)
[p5sagit/p5-mst-13.2.git] / t / io / binmode.t
CommitLineData
e940ddbb 1#!./perl -w
2
3BEGIN {
4 chdir 't' if -d 't';
5 @INC = '../lib';
6}
7
e940ddbb 8use Test::More tests => 8;
444e39b5 9use Config;
e940ddbb 10
11ok( binmode(STDERR), 'STDERR made binary' );
444e39b5 12if ($Config{useperlio}) {
13 ok( binmode(STDERR, ":unix"), ' with unix discipline' );
14} else {
15 ok(1, ' skip unix discipline for -Uuseperlio' );
16}
e940ddbb 17ok( binmode(STDERR, ":raw"), ' raw' );
18ok( binmode(STDERR, ":crlf"), ' and crlf' );
19
20# If this one fails, we're in trouble. So we just bail out.
21ok( binmode(STDOUT), 'STDOUT made binary' ) || exit(1);
444e39b5 22if ($Config{useperlio}) {
23 ok( binmode(STDOUT, ":unix"), ' with unix discipline' );
24} else {
25 ok(1, ' skip unix discipline for -Uuseperlio' );
26}
27ok( binmode(STDOUT, ":raw"), ' raw' );
28ok( binmode(STDOUT, ":crlf"), ' and crlf' );