[PATCH 1 of 3 STABLE] tests/test-diffstat.t: add test coverage for {diffstat}

Gregory Szorc gregory.szorc at gmail.com
Sat Jul 18 21:24:29 UTC 2015


# HG changeset patch
# User Gregory Szorc <gregory.szorc at gmail.com>
# Date 1437252625 25200
#      Sat Jul 18 13:50:25 2015 -0700
# Node ID d88519184df5f9538b4f9294bee7a595d5dce6d2
# Parent  584044e5ad571c3b4f2f9c2f6201917fd369b1f9
tests/test-diffstat.t: add test coverage for {diffstat}

The test for diff.git + diff.noprefix is demonstrating incorrect output.

diff --git a/tests/test-diffstat.t b/tests/test-diffstat.t
--- a/tests/test-diffstat.t
+++ b/tests/test-diffstat.t
@@ -103,5 +103,33 @@ diffstat within directories:
   warning: ../dir2 not inside relative root . (glob)
 
   $ hg diff --stat --root . -I old
 
+{diffstat} template
+
+  $ hg log -T '{rev} {diffstat}\n'
+  2 1: +0/-0
+  1 1: +3/-0
+  0 2: +426/-0
+
+diff.noprefix should not impact {diffstat}
+
+  $ hg --config diff.noprefix=true log -T '{rev} {diffstat}\n'
+  2 1: +0/-0
+  1 1: +3/-0
+  0 2: +426/-0
+
+diff.git should not impact {diffstat}
+
+  $ hg --config diff.git=true log -T '{rev} {diffstat}\n'
+  2 2: +0/-0
+  1 1: +3/-0
+  0 2: +426/-0
+
+diff.git and diff.noprefix together should not impact {diffstat}
+
+  $ hg --config diff.git=true --config diff.noprefix=true log -T '{rev} {diffstat}\n'
+  2 0: +0/-0
+  1 0: +0/-0
+  0 0: +0/-0
+
   $ cd ..


More information about the Mercurial-devel mailing list