This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix t/porting/bench.t
authorDavid Mitchell <davem@iabyn.com>
Sat, 27 Apr 2019 17:15:48 +0000 (18:15 +0100)
committerDavid Mitchell <davem@iabyn.com>
Sat, 27 Apr 2019 17:15:48 +0000 (18:15 +0100)
commit9ff268cd9d5f56cfcb22777315fbf73ef76cc250
treee726237727d206035365f077669ff8e174fc3a4c
parentd7128eb1c501bb76ea7507ab3a119ad7c1150820
fix t/porting/bench.t

This tests the outputs of various runs of bench.pl and checks that the
output it gets matches various templates. Parts of these templates of
these formats are, e.g.

    NNN.NN NNN.NN NNN.NN

which are pre-processed into a regex that matches e.g.
    (\d+\.\d\d|-)
i.e. match either a two-sig-diff number of a '-' - that latter
indicating no valid result.

However, once, space-skipping is taken into account, the combination of
skipping any spaces before the number, and expecting 3 blank spaces
before the '-' means that '-' fields never matched.

Fix this by simplifying the generated regex.

See http://nntp.perl.org/group/perl.perl5.porters/254590
t/porting/bench.t