diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-11-13 13:09:23 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-11-13 13:09:23 +0000 |
commit | bbd5c0f5ad81733b079008f34cd05cd9aef7d917 (patch) | |
tree | 3dd3e7a9f2b4dd237c14af452e2ef5d74bd74e64 /lib/open.t | |
parent | c66e906370b8d2e6899a8676fa0ea7ecbf7cf856 (diff) | |
download | perl-bbd5c0f5ad81733b079008f34cd05cd9aef7d917.tar.gz |
:utf8 works only with perlio.
p4raw-id: //depot/perl@12970
Diffstat (limited to 'lib/open.t')
-rw-r--r-- | lib/open.t | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/lib/open.t b/lib/open.t index 397e8f8763..5ee8ab9de0 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, "<utf8"); -is(ord(<I>), 0x100, ":utf8"); -close I; + use open ':utf8'; + open(O, ">utf8"); + print O chr(0x100); + close O; + open(I, "<utf8"); + is(ord(<I>), 0x100, ":utf8"); + close I; +} + +END { + 1 while unlink "utf8"; +} # the test cases beyond __DATA__ need to be executed separately |