diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-01-01 13:54:33 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-01-01 13:54:33 +0000 |
commit | aa45171451213bb4421b11aaca4c2bfe8adeec9d (patch) | |
tree | e3455ab53ecdd4f678170197d33968e80100f10f /t/io/layers.t | |
parent | c4ba80c3b5d4075de9ee1a174f3a69e74659709b (diff) | |
download | perl-aa45171451213bb4421b11aaca4c2bfe8adeec9d.tar.gz |
Change 23714 accidentally broke t/io/layers.t when testing with
UTF8 locales and the -C flag. When UTF8 is flagged as enabled
based on the locale, we have no perl space access to PL_utf8locale
so assume for the moment that UTF8 is never conditionally enabled.
p4raw-id: //depot/perl@23723
Diffstat (limited to 't/io/layers.t')
-rw-r--r-- | t/io/layers.t | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/t/io/layers.t b/t/io/layers.t index 4206c1a604..659d12de4d 100644 --- a/t/io/layers.t +++ b/t/io/layers.t @@ -31,8 +31,12 @@ my $DOSISH = $^O =~ /^(?:MSWin32|os2|dos|NetWare|mint)$/ ? 1 : 0; $DOSISH = 1 if !$DOSISH and $^O =~ /^uwin/; my $NONSTDIO = exists $ENV{PERLIO} && $ENV{PERLIO} ne 'stdio' ? 1 : 0; my $FASTSTDIO = $Config{d_faststdio} && $Config{usefaststdio} ? 1 : 0; - -my $NTEST = 43 - (($DOSISH || !$FASTSTDIO) ? 7 : 0) - ($DOSISH ? 5 : 0); +# FIXME. I think that we'll be needing ${^UTF8_LOCALE} +# This is a hack that assumes that no-one will use -C or -C65 (etc) +# without also having a UTF8 locale. Hopefully the smoke tests will pass. +my $UNICODE_STDIN = ${^UNICODE} & 1; +my $NTEST = 43 - (($DOSISH || !$FASTSTDIO) ? 7 : 0) - ($DOSISH ? 5 : 0) + + $UNICODE_STDIN; sub PerlIO::F_UTF8 () { 0x00008000 } # from perliol.h @@ -43,6 +47,8 @@ print <<__EOH__; # DOSISH = $DOSISH # NONSTDIO = $NONSTDIO # FASTSTDIO = $FASTSTDIO +# UNICODE = ${^UNICODE} +# UNICODE_STDIN = $UNICODE_STDIN __EOH__ SKIP: { @@ -107,7 +113,7 @@ SKIP: { } check([ PerlIO::get_layers(STDIN) ], - [ "stdio" ], + $UNICODE_STDIN ? [ "stdio", "utf8" ] : [ "stdio" ], "STDIN"); open(F, ">:crlf", "afile"); |