# HG changeset patch # User Peter Arrenbrecht # Date 1226513546 -3600 # Node ID 3c2ed7c2dcb425652497833f1212773f262ce586 # Parent 6eb38b2dca6c4ca3d3ac940064b3601f18b32679 patchbomb: add tests for diffstat, inline, and attach options diff -r 6eb38b2dca6c -r 3c2ed7c2dcb4 tests/test-patchbomb --- a/tests/test-patchbomb Wed Nov 12 19:12:21 2008 +0100 +++ b/tests/test-patchbomb Wed Nov 12 19:12:26 2008 +0100 @@ -68,3 +68,41 @@ fixheaders < mbox > mboxfix echo "% md5sum of 8-bit output" $TESTDIR/md5sum.py mboxfix + +echo "% test diffstat for single patch" +hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -d -y 2 | \ + fixheaders + +echo "% test diffstat for multiple patches" +hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -d -y 0:1 | \ + fixheaders + +echo "% test inline for single patch" +hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i 2 | \ + fixheaders + +echo "% test inline for multiple patches" +hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i 0:1 | \ + fixheaders + +echo "% test attach for single patch" +hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a 2 | \ + fixheaders + +echo "% test attach for multiple patches" +hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a 0:1 | \ + fixheaders + +echo "% tagging csets" +hg tag -r0 zero zero.foo +hg tag -r1 one one.patch +hg tag -r2 two two.diff + +echo "% test inline for single named patch" +hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i 2 | \ + fixheaders + +echo "% test inline for multiple named/unnamed patches" +hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i 0:1 | \ + fixheaders + diff -r 6eb38b2dca6c -r 3c2ed7c2dcb4 tests/test-patchbomb.out --- a/tests/test-patchbomb.out Wed Nov 12 19:12:21 2008 +0100 +++ b/tests/test-patchbomb.out Wed Nov 12 19:12:26 2008 +0100 @@ -189,3 +189,512 @@ Writing [PATCH] charset=us-ascii; content-transfer-encoding: 8bit ... % md5sum of 8-bit output 90fae277a4a85255e8262174fcefb59f mboxfix +% test diffstat for single patch +This patch series consists of 1 patches. + +c + +files patched: 1 + + +Displaying [PATCH] test ... +Content-Type: text/plain; charset="us-ascii" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [PATCH] test +X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f +Message-Id: