develooper Front page | perl.perl5.changes | Postings from March 2023

[Perl/perl5] 86e7b6: t/porting/bincompat.t - test the code itselfnot j...

From:
Yves Orton via perl5-changes
Date:
March 30, 2023 11:05
Subject:
[Perl/perl5] 86e7b6: t/porting/bincompat.t - test the code itselfnot j...
Message ID:
Perl/perl5/push/refs/heads/blead/f0ccf3-86e7b6@github.com
  Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 86e7b6187ab846b0bfdab1d5d58e1cec5182cedd
      https://github.com/Perl/perl5/commit/86e7b6187ab846b0bfdab1d5d58e1cec5182cedd
  Author: Yves Orton <demerphq@gmail.com>
  Date:   2023-03-30 (Thu, 30 Mar 2023)

  Changed paths:
    M perl.c
    M perl.h
    M t/porting/bincompat.t

  Log Message:
  -----------
  t/porting/bincompat.t - test the code itself not just the output

Our checks on the define info we expose via Internals::V(), especially
the sorted part, did not really work properly as it only checked defines
that are actually exposed in our standard builds.  Many of the defines
that are exposed in this list are special cases that would not be
enabled in a normal build we test under CI, and indeed prior to this
patch it was possible for us to produce unsorted output if certain
defines were enabled.

This patch adds checks that reads the actual code.  It checks that the
define and the string are the same, and it checks that strings would be
output in sorted order assuming every define was enabled.

There are two historical exceptions where the string we show and the
define use internally are different, but we work around these two cases
with as special case hash.





nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About