Re: [PATCH 1/4] parse-options: convert "command mode" to a flag
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Feb 20, 2020, 16:00 UTC
- Message-ID
- <nycvar.QRO.7.76.6.2002201659500.46@tvgsbejvaqbjf.bet>
- In-Reply-To
- <CAPig+cQkBKJLW3-W4SS0KX9+Gs2fT-Z-DrvVpcVOLZpFmVBoQA@mail.gmail.com>
Hi Eric,
On Wed, 19 Feb 2020, Eric Sunshine wrote:
Show 21 quoted lines
> On Wed, Feb 19, 2020 at 11:15 AM <pbonzini@redhat.com> wrote: > > OPTION_CMDMODE is essentially OPTION_SET_INT plus the extra check > > that the variable had not set before. In order to allow custom > > processing, change it to OPTION_SET_INT plus a new flag that takes > > care of the check. This works as long as the option value points > > to an int. > > > > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> > > --- > > diff --git a/t/t0040-parse-options.sh b/t/t0040-parse-options.sh > > @@ -324,6 +326,22 @@ test_expect_success 'OPT_NEGBIT() works' ' > > +test_expect_success 'OPT_CMDMODE() detects incompatibility' ' > > + test_must_fail test-tool parse-options --mode1 --mode2 >output 2>output.err && > > + test_must_be_empty output && > > + grep "incompatible with --mode" output.err > > +' > > The error message may have been localized, so use test_i18ngrep() > instead of 'grep': > > test_i18ngrep "incompatible with --mode" output.err
The error message _is_ localized, causing the GETTEXT_POISON job to fail:
https://dev.azure.com/gitgitgadget/git/_build/results?buildId=31113&view=ms.vss-test-web.build-test-results-tab&runId=97704&resultId=102357&paneView=debug
So yes. It needs to be changed to `test_i18ngrep`.
Thanks, Johannes
Show 11 quoted lines
> > > + > > +test_expect_success 'OPT_CMDMODE() detects incompatibility with something else' ' > > + test_must_fail test-tool parse-options --set23 --mode2 >output 2>output.err && > > + test_must_be_empty output && > > + grep "incompatible with something else" output.err > > +' > > Ditto. > >