Re: Cannot handle date (0, 0, 0, 2, 0, 1970)
[p5sagit/p5-mst-13.2.git] / lib / open.t
index 3a42ce5..5bc4b6d 100644 (file)
@@ -6,7 +6,7 @@ BEGIN {
        require Config; import Config;
 }
 
-use Test::More tests => 16;
+use Test::More tests => 15;
 
 # open::import expects 'open' as its first argument, but it clashes with open()
 sub import {
@@ -26,14 +26,6 @@ is( $^H & $open::hint_bits, 0,
        'hint bits should not be set in $^H before open import' );
 
 # prevent it from loading I18N::Langinfo, so we can test encoding failures
-{
-    local @INC;
-    $ENV{LC_ALL} = $ENV{LANG} = '';
-    eval { import( 'IN', 'locale' ) };
-    like( $@, qr/Cannot figure out an encoding/, 
-         'no encoding should be found without $ENV{LANG} or $ENV{LC_ALL}' );
-}
-
 my $warn;
 local $SIG{__WARN__} = sub {
        $warn .= shift;
@@ -183,7 +175,7 @@ eval { open::_get_locale_encoding() };
 like( $@, qr/too ambiguous/, 'should die with ambiguous locale encoding' );
 %%%
 # the special :locale layer
-$ENV{LANG} = 'ru_RU.KOI8-R';
+$ENV{LC_ALL} = $ENV{LANG} = 'ru_RU.KOI8-R';
 # the :locale will probe the locale environment variables like LANG
 use open OUT => ':locale';
 open(O, ">koi8");