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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux