X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Fopen.t;h=5bc4b6d18493dbce4d690641981518a48bf202cf;hb=e7ec2331900cd22a50f48dd01fa18bd3026f6253;hp=3a42ce5b156035a62406eb594f772b2455b0aa0d;hpb=24c435326ff7474b83b7249c5c50531eeeffe72f;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/open.t b/lib/open.t index 3a42ce5..5bc4b6d 100644 --- a/lib/open.t +++ b/lib/open.t @@ -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");