git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v14 4/6] parse-options.c: make OPTION_COUNTUP respect "unspecified" values

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Apr 13, 2016, 17:50 UTC
Message-ID
<CAPig+cQ9DvpJBBqwngfweX2KwC7mTG3TO+M+B84Rcrhw9JH-Mw@mail.gmail.com>
In-Reply-To
<CAFZEwPPoNz0W8kqva1_nudvK2ZVjuC1zk0xzM8f6bzL1efU4OA@mail.gmail.com>
On Wed, Apr 13, 2016 at 1:43 PM, Pranit Bauva <pranit.bauva@gmail.com> wrote:
Show 51 quoted lines
> On Wed, Apr 13, 2016 at 11:03 PM, Eric Sunshine <sunshine@sunshineco.com> wrote:
>> On Wed, Apr 13, 2016 at 4:39 AM, Pranit Bauva <pranit.bauva@gmail.com> wrote:
>>> On Wed, Apr 13, 2016 at 11:26 AM, Eric Sunshine <sunshine@sunshineco.com> wrote:
>>>> On Tue, Apr 12, 2016 at 7:02 PM, Pranit Bauva <pranit.bauva@gmail.com> wrote:
>>>>> +test_expect_success 'OPT_COUNTUP() resets to 0 with --no- flag' '
>>>>> +       test-parse-options --no-verbose >output 2>output.err &&
>>>>> +       test_must_be_empty output.err &&
>>>>> +       test_cmp expect output
>>>>> +'
>>>>
>>>> In my v12 review, I noticed that neither --no-verbose nor --no-quiet
>>>> was being tested by t0040 (which is conceptually independent of the
>>>> OPT__COUNTUP change) and suggested[3] that you add a new patch to
>>>> address that shortcoming. This idea was followed up by [1] saying that
>>>> this test (here) could then be dropped since the case it checks would
>>>> already be covered by the new patch. My impression was that you
>>>> agreed[4] that that made sense, however, this test is still here. Did
>>>> I misunderstand your response[4]?
>>>>
>>>> [1]: http://article.gmane.org/gmane.comp.version-control.git/290662
>>>> [2]: http://article.gmane.org/gmane.comp.version-control.git/289991
>>>> [3]: http://article.gmane.org/gmane.comp.version-control.git/290655
>>>> [4]: http://article.gmane.org/gmane.comp.version-control.git/290787
>>>
>>> I actually did include the tests in the patch 3/6[1]. I mentioned in
>>> my response[2] that I will include the tests between 2/5 and 3/5.
>>> Since, after that no email was exchanged, I thought you agreed.
>>
>> I'm not sure that I understand what you are saying since the
>> --no-verbose test does not seem to be included in the patch you cite
>> (it is instead in the present patch under discussion).
>>
>> Perhaps there is some miscommunication and misunderstanding.
>
> Sorry for being a bit unclear.
> I will explain this. The patch 3/6 contains the test which tests the
> quiet option thus in turn testing whether the variable quiet becomes 0
> with --no flag. This patch ie. 4/6 contains the test which tests the
> verbose options thus in turn testing whether the variable verbose
> becomes 0 with no flag. Both of them test different behavior as quiet
> is initially 0 while verbose is initially -1.
>
> So finally what I wanted to achieve is that I should test --no-quiet
> in 3/6 as till then this new behavior is not yet introduced. Thus, it
> will confirm the wanted behavior which exists before 4/6.
>
> This patch introduces a test to verify whether --no-verbose makes the
> variable 0. This patch introduces a new "unspecified" behavior. Thus
> we can test this new behavior with this.
>
> I hope now it is a bit clear on what I want to do.

Sorry, it's not clearer. I understand what you're trying to do, but it still seems to be the a less desirable (and more complex) approach since it's mixing conceptually distinct notions and mismatching them with changes in the wrong patches. But, perhaps my notion of "conceptually distinct" is different from yours and vice-versa.

Previous: Pranit BauvaNext: Pranit Bauva
Message 19 of 22 in “t0040-test-parse-options.sh: fix style issues”
  1. 1/6 t0040-test-parse-options.sh: fix style issuesPranit Bauva, Apr 12, 2016
  2. 2/6 test-parse-options: print quiet as integerPranit Bauva, Apr 12, 2016
  3. 3/6 t0040-parse-options: improve test coveragePranit Bauva, Apr 12, 2016
  4. Eric SunshineApr 13, 2016
  5. Pranit BauvaApr 13, 2016
  6. Eric SunshineApr 13, 2016
  7. Pranit BauvaApr 25, 2016
  8. Eric SunshineApr 27, 2016
  9. Pranit BauvaApr 27, 2016
  10. 6/6 commit: add a commit.verbose config variablePranit Bauva, Apr 12, 2016
  11. Eric SunshineApr 13, 2016
  12. Pranit BauvaApr 13, 2016
  13. Eric SunshineApr 13, 2016
  14. 4/6 parse-options.c: make OPTION_COUNTUP respect "unspecified" valuesPranit Bauva, Apr 12, 2016
  15. Eric SunshineApr 13, 2016
  16. Pranit BauvaApr 13, 2016
  17. Eric SunshineApr 13, 2016
  18. Pranit BauvaApr 13, 2016
  19. Eric SunshineApr 13, 2016
  20. 5/6 t7507-commit-verbose: improve test coverage by testing number of diffsPranit Bauva, Apr 12, 2016
  21. Eric SunshineApr 13, 2016
  22. Pranit BauvaApr 13, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.