changeset 27658:a6eddc8be811

test-patchbomb.t: test use of sendmail program
author Bryan O'Sullivan <bos@serpentine.com>
date Mon, 04 Jan 2016 21:54:46 -0800
parents 7b5c8c8a2f8c
children abc91688fa2c
files tests/test-patchbomb.t
diffstat 1 files changed, 19 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-patchbomb.t	Sat Jan 02 03:11:52 2016 -0800
+++ b/tests/test-patchbomb.t	Mon Jan 04 21:54:46 2016 -0800
@@ -2721,6 +2721,18 @@
   +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 @@
 
 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,11 @@
   @@ -1,1 +1,2 @@
    d
   +d
-  
+  Cc: 
+  
+  sending [PATCH] test ...
+  sending mail: $TESTTMP/t2/pretendmail.sh -f test foo
+
 Test pull url header
 =================================