"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "t/re/pat.t" between
perl-5.30.2.tar.xz and perl-5.30.3.tar.xz

About: Perl (Practical Extraction and Report Language) is a high-level, general-purpose, interpreted, dynamic programming language. Latest stable release.

pat.t  (perl-5.30.2.tar.xz):pat.t  (perl-5.30.3.tar.xz)
skipping to change at line 27 skipping to change at line 27
chdir 't' if -d 't'; chdir 't' if -d 't';
require Config; import Config; require Config; import Config;
require './test.pl'; require './charset_tools.pl'; require './test.pl'; require './charset_tools.pl';
require './loc_tools.pl'; require './loc_tools.pl';
set_up_inc('../lib', '.', '../ext/re'); set_up_inc('../lib', '.', '../ext/re');
} }
skip_all('no re module') unless defined &DynaLoader::boot_DynaLoader; skip_all('no re module') unless defined &DynaLoader::boot_DynaLoader;
skip_all_without_unicode_tables(); skip_all_without_unicode_tables();
plan tests => 869; # Update this when adding/deleting tests. plan tests => 873; # Update this when adding/deleting tests.
run_tests() unless caller; run_tests() unless caller;
# #
# Tests start here. # Tests start here.
# #
sub run_tests { sub run_tests {
my $sharp_s = uni_to_native("\xdf"); my $sharp_s = uni_to_native("\xdf");
{ {
skipping to change at line 2093 skipping to change at line 2093
# gh17490: test recursion check # gh17490: test recursion check
{ {
my $eval = '(?{1})'; my $eval = '(?{1})';
my $re = sprintf '(?&FOO)(?(DEFINE)(?<FOO>%sfoo))', $eval x 20; my $re = sprintf '(?&FOO)(?(DEFINE)(?<FOO>%sfoo))', $eval x 20;
my $result = eval qq{"foo" =~ /$re/}; my $result = eval qq{"foo" =~ /$re/};
is($@ // '', '', "many evals did not die"); is($@ // '', '', "many evals did not die");
ok($result, "regexp correctly matched"); ok($result, "regexp correctly matched");
} }
# gh16947: test regexp corruption (GOSUB)
{
fresh_perl_is(q{
'xy' =~ /x(?0)|x(?|y|y)/ && print 'ok'
}, 'ok', {}, 'gh16947: test regexp corruption (GOSUB)');
}
# gh16947: test fix doesn't break SUSPEND
{
fresh_perl_is(q{ 'sx' =~ m{ss++}i; print 'ok' },
'ok', {}, "gh16947: test fix doesn't break SUSPEND");
}
# gh17743: more regexp corruption via GOSUB
{
fresh_perl_is(q{
"0" =~ /((0(?0)|000(?|0000|0000)(?0))|)/; print "ok"
}, 'ok', {}, 'gh17743: test regexp corruption (1)');
fresh_perl_is(q{
"000000000000" =~ /(0(())(0((?0)())|000(?|\x{ef}\x{bf}\x{bd}|\x{ef}\
x{bf}\x{bd}))|)/;
print "ok"
}, 'ok', {}, 'gh17743: test regexp corruption (2)');
}
} # End of sub run_tests } # End of sub run_tests
1; 1;
# #
# ex: set ts=8 sts=4 sw=4 et: # ex: set ts=8 sts=4 sw=4 et:
# #
 End of changes. 2 change blocks. 
1 lines changed or deleted 26 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)