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

Re: [PATCH] test-lib-functions: simplify `test_file_not_empty` failure message

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Mar 1, 2024, 22:59 UTC
Message-ID
<CAPig+cSt4Q0e+DioFiy7yjBgn5+gWNqQOYc0eCAgdYrZUp8VBQ@mail.gmail.com>
In-Reply-To
<xmqqsf194n7a.fsf@gitster.g>
On Fri, Mar 1, 2024 at 5:11 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 15 quoted lines
> Eric Sunshine <ericsunshine@charter.net> writes:
> > A more accurate message might be "'foo' is empty but
> > should not be (or doesn't exist)", but that's unnecessarily long-winded
> > and adds little information that the test author couldn't discover by
> > noticing the file's absence.
>
> The "adds little information" version may be
>
>                 echo "'$1' is either missing or empty, but should not be"
>
> And avoiding "X is Y, but should  be ~Y" construct, perhaps
>
>                 echo "'$1' should be a file with non-empty contents"
>
> would work better?  I dunno.

I find "'$1' is either missing or empty, but should not be" suggestion clear and easily understood. I'll reroll with that.

Previous: Junio C HamanoNext: Dirk Gouders
Message 3 of 8 in “test-lib-functions: simplify `test_file_not_empty` failure message”
  1. test-lib-functions: simplify `test_file_not_empty` failure messageEric Sunshine, Mar 1, 2024
  2. Junio C HamanoMar 1, 2024
  3. Eric SunshineMar 1, 2024
  4. Dirk GoudersMar 2, 2024
  5. Junio C HamanoMar 2, 2024
  6. Dirk GoudersMar 3, 2024
  7. Rubén JustoMar 2, 2024
  8. Junio C HamanoMar 2, 2024

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.