From: Nicholas Clark Date: Sat, 1 Jan 2005 13:54:33 +0000 (+0000) Subject: Change 23714 accidentally broke t/io/layers.t when testing with X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=aa45171451213bb4421b11aaca4c2bfe8adeec9d;p=p5sagit%2Fp5-mst-13.2.git 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 --- diff --git a/t/io/layers.t b/t/io/layers.t index 4206c1a..659d12d 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");