Re: [PATCH 04/10] bugreport tests: tighten up "git bugreport -s hooks" test

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

 



Ævar Arnfjörð Bjarmason  <avarab@xxxxxxxxx> writes:

> +	write_script .git/hooks/applypatch-msg <<-\EOF &&
> +	true
> +	EOF
> +	write_script .git/hooks/unknown-hook <<-\EOF &&
> +	true
> +	EOF
>  	git bugreport -s hooks &&
> +
>  	grep applypatch-msg git-bugreport-hooks.txt &&
> -	! grep prepare-commit-msg git-bugreport-hooks.txt
> +	! grep unknown-hook git-bugreport-hooks.txt &&
> +	! grep -F .sample git-bugreport-hooks.txt
>  '

The above is not wrong per-se, but because we control which hooks
are and are not visible to "git bugreport" we run in this test, I
wonder if we should do

	git bugreport -s tmp &&
	sed -ne '/^\[Enabled Hooks\]$/,/^$/p' git-bugreport-tmp.txt |
	sort >actual &&
	sort >expect <<-\EOF &&
	[Enabled Hooks]
	applypatch-msg
	EOF
	test_cmp expect actual

instead.  It is not like checking the "git help -a" output for list
of commands, which may grow or shrink as the system evolves.





[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