In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/3602166ee56e8cc46087203f9902d06fe89e60d5?hp=4286711ac0be1bf8f37eadee54b2e9ebbb08e0d8>
- Log ----------------------------------------------------------------- commit 3602166ee56e8cc46087203f9902d06fe89e60d5 Author: Father Chrysostomos <[email protected]> Date: Sun Oct 19 17:16:39 2014 -0700 dump.c: Fix C++ build M dump.c commit 1ccc3f315dfe4a506ca5bde163b3e89e9cec3fa5 Author: Father Chrysostomos <[email protected]> Date: Sun Oct 19 13:51:25 2014 -0700 signatures.t: To-do tests for #123010 M t/op/signatures.t ----------------------------------------------------------------------- Summary of changes: dump.c | 4 ++-- t/op/signatures.t | 23 +++++++++++++++++++++-- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/dump.c b/dump.c index 4c5c76e..a8956c9 100644 --- a/dump.c +++ b/dump.c @@ -275,8 +275,8 @@ Perl_pv_pretty( pTHX_ SV *dsv, char const * const str, const STRLEN count, const STRLEN max, char const * const start_color, char const * const end_color, const U32 flags ) { - const U8 *quotes = (flags & PERL_PV_PRETTY_QUOTE) ? "\"\"" : - (flags & PERL_PV_PRETTY_LTGT) ? "<>" : NULL; + const U8 *quotes = (U8*)((flags & PERL_PV_PRETTY_QUOTE) ? "\"\"" : + (flags & PERL_PV_PRETTY_LTGT) ? "<>" : NULL); STRLEN escaped; STRLEN max_adjust= 0; STRLEN orig_cur; diff --git a/t/op/signatures.t b/t/op/signatures.t index f9c6770..861371b 100644 --- a/t/op/signatures.t +++ b/t/op/signatures.t @@ -2,10 +2,9 @@ BEGIN { chdir 't' if -d 't'; - @INC = '../lib'; require './test.pl'; + set_up_inc('../lib'); } -plan 912; eval "#line 8 foo\nsub t004 :method (\$a) { }"; is $@, "Experimental subroutine signatures not enabled at foo line 8\.\n", @@ -1303,4 +1302,24 @@ is scalar(t117()), undef; is scalar(@{[ t117(333, 444) ]}), 0; is scalar(t117(333, 444)), undef; +use File::Spec::Functions; +my $keywords_file = catfile(updir,'regen','keywords.pl'); +open my $kh, $keywords_file + or die "$0 cannot open $keywords_file: $!"; +while(<$kh>) { + if (m?__END__?..${\0} and /^[+-]/) { + chomp(my $word = $'); + # $y should be an error after $x=foo. The exact error we get may + # differ if this is __END__ or s or some other special keyword. + eval 'sub ($x = ' . $word . ', $y) {}'; + local $::TODO = 'does not work yet' + if $word =~ /^(?:chmod|chown|die|exec|glob|kill|mkdir|print + |printf|return|reverse|select|setpgrp|sort|split + |system|unlink|utime|warn)\z/x; + isnt $@, "", "$word does not swallow trailing comma"; + } +} + +done_testing; + 1; -- Perl5 Master Repository
