[PATCH] test-patchbomb: ensure hg email write to stdout

Sébastien Brissaud sebastien at brissaud.name
Sat Feb 13 01:56:54 EST 2016


On 2016-02-11 07:31, Yuya Nishihara wrote:
> On Sun, 07 Feb 2016 09:40:40 +0100, Sébastien Brissaud wrote:
>> # HG changeset patch
>> # User Sébastien Brissaud <sebastien at brissaud.name>
>> # Date 1454834169 -3600
>> #      Sun Feb 07 09:36:09 2016 +0100
>> # Node ID 0ae5dbe79b178337e1459377a1ebbf7ce7bb0485
>> # Parent  a036e1ae1fbe88ab99cb861ebfc2e4da7a3912ca
>> test-patchbomb: ensure hg email write to stdout
>> 
>> With -n/--test and if the PAGER environment variable is set, 'hg 
>> email' send its
>> output to the user defined pager.
>> 
>> If the pager capture the output, the test is unable verify it.
>> 
>> Unsetting the PAGER environment variable force 'hg email' to write to 
>> stdout.
> 
> Confirmed with PAGER=true. Pushed to the clowncopter, thanks!

Would it make sense to also add a test that ensure that 'hg email 
--test' fire up the pager if PAGER is set?
For example:
+Test -n/--test fire up pager if the PAGER environment variable is set
+  $ PAGER='head -1 | sed "s/^/PAGER: /"' hg email --date '1970-1-1 0:1' 
-n -f quux -t foo -c bar -r tip
+  this patch series consists of 1 patches.
+
+
+  displaying [PATCH] a ...
+  PAGER: Content-Type: text/plain; charset="us-ascii"

-- 
sbr


More information about the Mercurial-devel mailing list