From: Nicholas Clark Date: Sun, 26 Aug 2001 12:03:05 +0000 (+0100) Subject: t/io/binmode.t X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=444e39b5b9f36cd0f60283ca4c60fc108157921f;p=p5sagit%2Fp5-mst-13.2.git t/io/binmode.t Message-Id: <20010826120305.C4950@plum.flirble.org> (Also a nitpick in #11752 to t/op/universal.t) p4raw-id: //depot/perl@11754 --- diff --git a/t/io/binmode.t b/t/io/binmode.t index 76fd5a7..34a462d 100644 --- a/t/io/binmode.t +++ b/t/io/binmode.t @@ -5,16 +5,24 @@ BEGIN { @INC = '../lib'; } - use Test::More tests => 8; +use Config; ok( binmode(STDERR), 'STDERR made binary' ); -ok( binmode(STDERR, ":unix"), ' with unix discipline' ); +if ($Config{useperlio}) { + ok( binmode(STDERR, ":unix"), ' with unix discipline' ); +} else { + ok(1, ' skip unix discipline for -Uuseperlio' ); +} ok( binmode(STDERR, ":raw"), ' raw' ); ok( binmode(STDERR, ":crlf"), ' and crlf' ); # If this one fails, we're in trouble. So we just bail out. ok( binmode(STDOUT), 'STDOUT made binary' ) || exit(1); -ok( binmode(STDOUT, ":unix"), ' with unix discipline' ); -ok( binmode(STDERR, ":raw"), ' raw' ); -ok( binmode(STDERR, ":crlf"), ' and crlf' ); +if ($Config{useperlio}) { + ok( binmode(STDOUT, ":unix"), ' with unix discipline' ); +} else { + ok(1, ' skip unix discipline for -Uuseperlio' ); +} +ok( binmode(STDOUT, ":raw"), ' raw' ); +ok( binmode(STDOUT, ":crlf"), ' and crlf' ); diff --git a/t/op/universal.t b/t/op/universal.t index a67c77f..efda2a5 100755 --- a/t/op/universal.t +++ b/t/op/universal.t @@ -68,7 +68,7 @@ test ! $a->can("sleep"); test my $ref = $a->can("drink"); # returns a coderef test $a->$ref("tea") eq "drinking tea"; # ... which works test $ref = $a->can("sing"); -eval { $a->sing }; +eval { $a->$ref() }; test $@; # ... but not if no actual subroutine test (!Cedric->isa('Programmer'));