diff options
author | Hugo van der Sanden <hv@crypt.org> | 2023-01-18 23:58:19 +0000 |
---|---|---|
committer | Hugo van der Sanden <hv@crypt.org> | 2023-01-20 11:29:21 +0000 |
commit | 12fb3ffd42aee3e4e8e8812a763d1dda401f2835 (patch) | |
tree | 2027fd686cd1454957ed4fe9e056c06eb7577855 /Porting | |
parent | 81d293c2ade11f8b37d56de2238d688df56ca9bd (diff) | |
download | perl-12fb3ffd42aee3e4e8e8812a763d1dda401f2835.tar.gz |
bisect-runner docs: modify example to use 'expect-fail'
Diffstat (limited to 'Porting')
-rwxr-xr-x | Porting/bisect-runner.pl | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Porting/bisect-runner.pl b/Porting/bisect-runner.pl index 12a2014c18..8267befc00 100755 --- a/Porting/bisect-runner.pl +++ b/Porting/bisect-runner.pl @@ -1109,9 +1109,8 @@ where the code began to compile; the point where the code no longer emitted warnings; etc. We can use this program for that purpose, but we have to reverse our sense of -"good" and "bad" commits. In this case, F<git> will label the healing commit -as "bad" (or label a breaking commit as "good"), so we have to invoke the -program such that we do a C<die> when we reach the healing commit. +"good" and "bad" commits. We use the C<--expect-fail> option to do that +reversal. =item * Problem @@ -1136,10 +1135,10 @@ But it was observed that there was no warning in perl-5.36. $ perl Porting/bisect.pl \ --start=5624cfff8f \ --end=b80b9f7fc6 \ + --expect-fail \ -we 'use Scalar::Util; use bigrat; my @w; - local $SIG{__WARN__} = sub { push @w, $_; }; - print "mercy\n" if Scalar::Util::looks_like_number(1/9); - die unless @w;' + local $SIG{__WARN__} = sub { die }; + print "mercy\n" if Scalar::Util::looks_like_number(1/9)' =item * Reference |