Re: [PATCH 10/29] t9001: fix broken "invoke hook" test

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

 



> diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
> index e80eacbb1b..776769fe0d 100755
> --- a/t/t9001-send-email.sh
> +++ b/t/t9001-send-email.sh
> @@ -1966,11 +1966,11 @@ test_expect_success $PREREQ 'invoke hook' '
>  
>  		# Verify error message when a patch is rejected by the hook
>  		sed -e "s/add master/x/" ../0001-add-master.patch >../another.patch &&
> -		git send-email \
> +		test_must_fail git send-email \
>  			--from="Example <nobody@xxxxxxxxxxx>" \
>  			--to=nobody@xxxxxxxxxxx \
>  			--smtp-server="$(pwd)/../fake.sendmail" \
> -			../another.patch 2>err
> +			../another.patch 2>err &&
>  		test_i18ngrep "rejected by sendemail-validate hook" err

Thanks for catching this. Indeed, "git send-email" is supposed to fail
because the validate hook greps for the string "add master", which does
not exist in the e-mail to be sent. (Above this is a test that shows
that the same validate hook succeeds if the e-mail contains "add
master".) This looks correct to me.



[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