From: Jarkko Hietaniemi Date: Mon, 1 Oct 2001 14:51:42 +0000 (+0000) Subject: Nuke also the LANG because of glibc. X-Git-Tag: accepted/trunk/20130322.191538~30044 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=20e513cf85a6f96ec9a4aa09812ad23e77488856;p=platform%2Fupstream%2Fperl.git Nuke also the LANG because of glibc. p4raw-id: //depot/perl@12294 --- diff --git a/lib/open.t b/lib/open.t index 90e5e3b..b2a9ba6 100644 --- a/lib/open.t +++ b/lib/open.t @@ -13,7 +13,7 @@ sub import { } # can't use require_ok() here, with a name like 'open' -ok( require 'open.pm', 'required okay!' ); +ok( require 'open.pm', 'require' ); # this should fail eval { import() }; @@ -24,7 +24,7 @@ is( $^H & $open::hint_bits, 0, '$^H is okay before open import runs' ); # prevent it from loading I18N::Langinfo, so we can test encoding failures local @INC; -$ENV{LC_ALL} = ''; +undef @ENV{qw(LC_ALL LANG LANGUAGE)}; eval { import( 'IN', 'locale' ) }; like( $@, qr/Cannot figure out an encoding/, 'no encoding found' ); @@ -40,16 +40,16 @@ like( $warn, qr/Unknown discipline layer/, 'warned about unknown discipline' ); # now load a real-looking locale $ENV{LC_ALL} = ' .utf8'; import( 'IN', 'locale' ); -is( ${^OPEN}, ':utf8\0', 'set locale layer okay!' ); +is( ${^OPEN}, ':utf8\0', 'set locale layer' ); # and see if it sets the magic variables appropriately import( 'IN', ':crlf' ); ok( $^H & $open::hint_bits, '$^H is set after open import runs' ); -is( $^H{'open_IN'}, 'crlf', 'set crlf layer okay!' ); +is( $^H{'open_IN'}, 'crlf', 'set crlf layer' ); # it should reset them appropriately, too import( 'IN', ':raw' ); -is( $^H{'open_IN'}, 'raw', 'set raw layer okay!' ); +is( $^H{'open_IN'}, 'raw', 'set raw layer' ); # it dies if you don't set IN, OUT, or INOUT eval { import( 'sideways', ':raw' ) };