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

Re: [PATCH] t1517: more coverage for commands that work without repository

From
Patrick Steinhardt <ps@pks.im>
Date
May 31, 2024, 11:26 UTC
Message-ID
<Zlmz9Edyv_gehMVr@tanuki>
In-Reply-To
<xmqqbk4np77d.fsf@gitster.g>

On Thu, May 30, 2024 at 09:58:46AM -0700, Junio C Hamano wrote: [snip]

> +test_expect_success 'stripspace outside repository' '
> +	nongit git stripspace -s </dev/null
> +'

I was wondering whether we also want to verify that it does the correct thing here as it's comparatively easy:

	test_expect_success 'stripspace outside repository' '
		cat >input <<-EOF &&
		# foo
		bar
		EOF
		cat >expect <<-EOF &&
		bar
		EOF
		git stripspace -s <input >actual &&
		test_cmp expect actual &&
		nongit git stripspace -s <input >actual &&
		test_cmp expect actual
	'

For the other tests it's a bit more involved. And given that these are all designed as smoke tests, I think it's fine overall.

Thanks!
Patrick
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 4 in “t1517: more coverage for commands that work without repository”
  1. t1517: more coverage for commands that work without repositoryJunio C Hamano, May 30, 2024
  2. t1517: more coverage for commands that work without repositoryJunio C Hamano, May 31, 2024
  3. Patrick SteinhardtMay 31, 2024
  4. Junio C HamanoMay 31, 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.