Patchwork [1,of,4] test-patchbomb.t: test use of sendmail program

login
register
mail settings
Submitter Bryan O'Sullivan
Date Jan. 5, 2016, 5:56 a.m.
Message ID <48f03f0d7b63e0506d21.1451973367@bryano-mbp.local>
Download mbox | patch
Permalink /patch/12517/
State Accepted
Delegated to: Yuya Nishihara
Headers show

Comments

Bryan O'Sullivan - Jan. 5, 2016, 5:56 a.m.
# HG changeset patch
# User Bryan O'Sullivan <bos@serpentine.com>
# Date 1451973286 28800
#      Mon Jan 04 21:54:46 2016 -0800
# Node ID 48f03f0d7b63e0506d2176a5906c0f12e1f7b223
# Parent  0486b6c4d3568ecb7d4e3f8190d200455fb53650
test-patchbomb.t: test use of sendmail program
Yuya Nishihara - Jan. 6, 2016, 12:57 p.m.
On Mon, 04 Jan 2016 21:56:07 -0800, Bryan O'Sullivan wrote:
> # HG changeset patch
> # User Bryan O'Sullivan <bos@serpentine.com>
> # Date 1451973286 28800
> #      Mon Jan 04 21:54:46 2016 -0800
> # Node ID 48f03f0d7b63e0506d2176a5906c0f12e1f7b223
> # Parent  0486b6c4d3568ecb7d4e3f8190d200455fb53650
> test-patchbomb.t: test use of sendmail program

I've pushed the first two to the clowncopter, thanks.

Patch

diff --git a/tests/test-patchbomb.t b/tests/test-patchbomb.t
--- a/tests/test-patchbomb.t
+++ b/tests/test-patchbomb.t
@@ -2721,6 +2721,18 @@  dest#branch URIs:
   +d
   
 
+Set up a fake sendmail program
+
+  $ cat > pretendmail.sh << 'EOF'
+  > #!/bin/sh
+  > echo "$@"
+  > cat
+  > EOF
+  $ chmod +x pretendmail.sh
+
+  $ echo '[email]' >> $HGRCPATH
+  $ echo "method=`pwd`/pretendmail.sh" >> $HGRCPATH
+
 Test introduction configuration
 =================================
 
@@ -2806,15 +2818,13 @@  bad value setting
 
 single rev
 
-  $ hg email --date '1980-1-1 0:1' -n -t foo -s test -r '10'
+  $ hg email  --date '1980-1-1 0:1' -v -t foo -s test -r '10'
   From [test]: test
   this patch series consists of 1 patches.
   
   warning: invalid patchbomb.intro value "mpmwearaclownnose"
   (should be one of always, never, auto)
-  Cc: 
-  
-  displaying [PATCH] test ...
+  -f test foo
   Content-Type: text/plain; charset="us-ascii"
   MIME-Version: 1.0
   Content-Transfer-Encoding: 7bit
@@ -2844,7 +2854,10 @@  single rev
   @@ -1,1 +1,2 @@
    d
   +d
-  
+  Cc: 
+  
+  sending [PATCH] test ...
+  sending mail: $TESTTMP/t2/pretendmail.sh -f test foo
 Test pull url header
 =================================