Branch: refs/heads/yves/fix_diag_t Home: https://github.com/Perl/perl5 Commit: 4dece40353c65a2aed4c24bf7fb58bea4897b15e https://github.com/Perl/perl5/commit/4dece40353c65a2aed4c24bf7fb58bea4897b15e Author: Yves Orton <demer...@gmail.com> Date: 2022-09-05 (Mon, 05 Sep 2022)
Changed paths: M dquote.c M op.c M os2/os2ish.h M perl.h M t/porting/diag.t Log Message: ----------- porting/diag.t - improved parsing a bit The "multiline" logic of diag.t was getting confused by define statements that would define a symbol to call an error function but not end in ";", this would then slurp potentially many lines errorenously, potentially absorbing more than one message. The multi-line logic also would undef $listed_as and lose the diag_listed_as data in some circumstances. Fixing those issues revealed some interesting cases. To fix one of them I defined a new noop macro in perl.h to help: PERL_DIAG_WARN_SYNTAX(), which helps the diag.t parser identify messages without needing to be actually part of a specific message line. These macros are noops, they just return their argument, but they help hint to diag.t what is going on. Maybe in the future this can be reworked to be more generic, there are other similar cases that are not covered. Interestingly fixing this bug meant that at least one message that used to be erroneously picked up was no longer identified or tested. This was replaced with a PERL_DIAG_DIE_SYNTAX() wrapper.