summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael G Schwern <schwern@pobox.com>2010-09-20 22:23:48 -0700
committerFather Chrysostomos <sprout@cpan.org>2010-09-20 22:23:48 -0700
commita636ff160adfade25b615b2e632590a3763b285c (patch)
tree4c53f97b416f3e44e26e4f714969c5ab44697d63
parenta539498ab05fd838aa1eaaebbe1f3528bb97d1d3 (diff)
downloadperl-a636ff160adfade25b615b2e632590a3763b285c.tar.gz
Test localization of English.pm’s $LIST_SEPARATOR [perl #47107]
-rw-r--r--lib/English.t12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/English.t b/lib/English.t
index aa7e9d47bc..bc0a5da76e 100644
--- a/lib/English.t
+++ b/lib/English.t
@@ -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.