This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bump Unicode version
[perl5.git]
/
lib
/
English.t
diff --git
a/lib/English.t
b/lib/English.t
old mode 100755
(executable)
new mode 100644
(file)
index
49819fc
..
bc0a5da
--- a/
lib/English.t
+++ b/
lib/English.t
@@
-6,7
+6,7
@@
BEGIN {
@INC = '../lib';
}
@INC = '../lib';
}
-use Test::More tests => 5
4
;
+use Test::More tests => 5
7
;
use English qw( -no_match_vars ) ;
use Config;
use English qw( -no_match_vars ) ;
use Config;
@@
-99,7
+99,7
@@
ok( $SYSTEM_FD_MAX >= 2, '$SYSTEM_FD_MAX should be at least 2' );
is( $INPLACE_EDIT, '.inplace', '$INPLACE_EDIT' );
'aabbcc' =~ /(.{2}).+(.{2})(?{ 9 })/;
is( $INPLACE_EDIT, '.inplace', '$INPLACE_EDIT' );
'aabbcc' =~ /(.{2}).+(.{2})(?{ 9 })/;
-is( $LAST_PAREN_MATCH, 'cc', '$LAST_PAREN
T
_MATCH' );
+is( $LAST_PAREN_MATCH, 'cc', '$LAST_PAREN_MATCH' );
is( $LAST_REGEXP_CODE_RESULT, 9, '$LAST_REGEXP_CODE_RESULT' );
is( $LAST_MATCH_START[1], 0, '@LAST_MATCH_START' );
is( $LAST_REGEXP_CODE_RESULT, 9, '$LAST_REGEXP_CODE_RESULT' );
is( $LAST_MATCH_START[1], 0, '@LAST_MATCH_START' );
@@
-142,6
+142,12
@@
main::is( $PREMATCH, 'a', '$PREMATCH defined' );
main::is( $MATCH, 'b', '$MATCH defined' );
main::is( $POSTMATCH, 'c', '$POSTMATCH defined' );
main::is( $MATCH, 'b', '$MATCH defined' );
main::is( $POSTMATCH, 'c', '$POSTMATCH defined' );
+{
+ my $s = "xyz";
+ $s =~ s/y/t$MATCH/;
+ main::is( $s, "xtyz", '$MATCH defined in right side of s///' );
+}
+
package C;
use English qw( -no_match_vars ) ;
package C;
use English qw( -no_match_vars ) ;
@@
-152,6
+158,16
@@
main::ok( !$PREMATCH, '$PREMATCH disabled' );
main::ok( !$MATCH, '$MATCH disabled' );
main::ok( !$POSTMATCH, '$POSTMATCH 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.
__END__
This is a line.
This is a paragraph.