[PATCH 3 of 4] test-patchbomb.t: add test for case where sendmail fails

Yuya Nishihara yuya at tcha.org
Wed Jan 6 07:03:07 CST 2016


On Mon, 04 Jan 2016 21:56:09 -0800, Bryan O'Sullivan wrote:
> # HG changeset patch
> # User Bryan O'Sullivan <bos at serpentine.com>
> # Date 1451973286 28800
> #      Mon Jan 04 21:54:46 2016 -0800
> # Node ID 3838e999a656ccd5644fadac75ed91f15ad22854
> # Parent  1dcd7d9c98ffab398482b07c539c9520235588e8
> test-patchbomb.t: add test for case where sendmail fails
> 
> Notice that the wrong error code is reported. To be continued...
> 
> diff --git a/tests/test-patchbomb.t b/tests/test-patchbomb.t
> --- a/tests/test-patchbomb.t
> +++ b/tests/test-patchbomb.t
> @@ -2816,7 +2816,9 @@ bad value setting
>  
>    $ echo 'intro=mpmwearaclownnose' >> $HGRCPATH
>  
> -single rev
> +single rev, and introduce a deliberate fake sendmail failure
> +
> +  $ echo exit 78 >> pretendmail.sh
>  
>    $ hg email  --date '1980-1-1 0:1' -v -t foo -s test -r '10'
>    From [test]: test
> @@ -2858,6 +2860,8 @@ single rev
>    
>    sending [PATCH] test ...
>    sending mail: $TESTTMP/t2/pretendmail.sh -f test foo
> +  abort: pretendmail.sh exited with status 19968
> +  [255]

Just FYI, this is the same issue as
http://bz.mercurial-scm.org/show_bug.cgi?id=4746


More information about the Mercurial-devel mailing list