This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Test localization of English.pm’s $LIST_SEPARATOR [perl #47107]
authorMichael G Schwern <schwern@pobox.com>
Tue, 21 Sep 2010 05:23:48 +0000 (22:23 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Tue, 21 Sep 2010 05:23:48 +0000 (22:23 -0700)
lib/English.t

index aa7e9d4..bc0a5da 100644 (file)
@@ -6,7 +6,7 @@ BEGIN {
     @INC = '../lib';
 }
 
-use Test::More tests => 55;
+use Test::More tests => 57;
 
 use English qw( -no_match_vars ) ;
 use Config;
@@ -158,6 +158,16 @@ main::ok( !$PREMATCH, '$PREMATCH disabled' );
 main::ok( !$MATCH, '$MATCH disabled' );
 main::ok( !$POSTMATCH, '$POSTMATCH disabled' );
 
+
+# Check that both variables change when localized.
+{
+    local $LIST_SEPARATOR = "wibble";
+    ::is $", 'wibble', '$" changes when $LIST_SEPARATOR is localized';
+
+    local $" = 'frooble';
+    ::is $LIST_SEPARATOR, 'frooble';
+}
+
 __END__
 This is a line.
 This is a paragraph.