Re: [PATCH 8/8] tests: disallow the use of abbreviated options (by default)
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Mar 25, 2019, 20:26 UTC
- Message-ID
- <87r2aubsza.fsf@evledraar.gmail.com>
- In-Reply-To
- <20190325183505.GA28920@dev-l>
On Mon, Mar 25 2019, Denton Liu wrote:
Show 20 quoted lines
> Hi Johannes, > > Thanks for catching this. Perhaps I should've been more diligent and ran > the entire test suite before submitting but I was running low on > batteries only ran the rebase-related tests. > > On Mon, Mar 25, 2019 at 11:14:23AM -0700, Johannes Schindelin via GitGitGadget wrote: >> From: Johannes Schindelin <johannes.schindelin@gmx.de> >> [...] >> @@ -325,6 +329,7 @@ file: (not set) >> EOF >> >> test_expect_success 'negation of OPT_NONEG flags is not ambiguous' ' >> + GIT_TEST_DISALLOW_ABBREVIATED_OPTIONS=false \ >> test-tool parse-options --no-ambig >output 2>output.err && >> test_must_be_empty output.err && >> test_cmp expect output > > Would it make sense to include a test case to ensure that > GIT_TEST_DISALLOW_ABBREVIATED_OPTIONS is working properly?
To elaborate on this since one might wonder "but aren't these those tests?". I think you mean if we shouldn't have a "test_must_fail" test there that asserts that parsing the options will die with the default of GIT_TEST_DISALLOW_ABBREVIATED_OPTIONS=true. Yeah, that makes sense, it's currently a blind spot that we just assume will keep working.