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

From: Patrick Steinhardt <[email-masked]>
Date: Fri, 31 May 2024 13:26:44 +0200

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