From: Jarkko Hietaniemi Date: Tue, 13 Nov 2001 13:09:23 +0000 (+0000) Subject: :utf8 works only with perlio. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bbd5c0f5ad81733b079008f34cd05cd9aef7d917;p=p5sagit%2Fp5-mst-13.2.git :utf8 works only with perlio. p4raw-id: //depot/perl@12970 --- diff --git a/lib/open.t b/lib/open.t index 397e8f8..5ee8ab9 100644 --- a/lib/open.t +++ b/lib/open.t @@ -3,6 +3,7 @@ BEGIN { chdir 't' if -d 't'; @INC = '../lib'; + require Config; import Config; } use Test::More tests => 13; @@ -67,14 +68,21 @@ is( ${^OPEN}, ":raw :crlf\0:raw :crlf", 'should set multi types, multi disciplines' ); is( $^H{'open_IO'}, 'crlf', 'should record last layer set in %^H' ); +SKIP: { + skip("no perlio, no :utf8", 1) unless $Config{'useperlio'}; # the special :utf8 layer -use open ':utf8'; -open(O, ">utf8"); -print O chr(0x100); -close O; -open(I, "), 0x100, ":utf8"); -close I; + use open ':utf8'; + open(O, ">utf8"); + print O chr(0x100); + close O; + open(I, "), 0x100, ":utf8"); + close I; +} + +END { + 1 while unlink "utf8"; +} # the test cases beyond __DATA__ need to be executed separately