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

Re: [PATCH 1/3] tests: do not negate test_path_exists

From
Junio C Hamano <gitster@pobox.com>
Date
May 16, 2023, 16:10 UTC
Message-ID
<xmqqzg64uuid.fsf@gitster.g>
In-Reply-To
<CAPig+cRwPUJZdov7eAZbZ1qji9qj_Oh5RQ8bpLWsXW9J+QnvPA@mail.gmail.com>
Eric Sunshine <sunshine@sunshineco.com> writes:
Show 7 quoted lines
> On Mon, May 15, 2023 at 10:37 PM Junio C Hamano <gitster@pobox.com> wrote:
>> As a way to assert the path 'foo' is missing, "! test_path_exists foo" a
>> poor way to do so, as the helper is designed to complain when 'foo' is
>> missing, but the intention of the author who used negated form was to
>> make sure it does not exist.  This does not help debugging the tests.
>
> s/a poor/is &/
Thanks.
>
>> Use test_path_is_missing instead, which is a more appropriate helper.
>>
>> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Previous: Eric SunshineNext: Junio C Hamano
Message 4 of 6 in “fix use of "! test_path_is_foo" in tests”
  1. 0/3 fix use of "! test_path_is_foo" in testsJunio C Hamano, May 16, 2023
  2. 1/3 tests: do not negate test_path_existsJunio C Hamano, May 16, 2023
  3. Eric SunshineMay 16, 2023
  4. Junio C HamanoMay 16, 2023
  5. 3/3 test: do not negate test_path_is_* to assert absenseJunio C Hamano, May 16, 2023
  6. 2/3 t2021: do not negate test_path_is_dirJunio C Hamano, May 16, 2023

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.