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

login
register
mail settings
Submitter Gregory Szorc
Date July 18, 2015, 9:24 p.m.
Message ID <d88519184df5f9538b4f.1437254669@vm-ubuntu-main.gateway.sonic.net>
Download mbox | patch
Permalink /patch/10037/
State Changes Requested
Delegated to: Matt Mackall
Headers show

Comments

Gregory Szorc - July 18, 2015, 9:24 p.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@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.

Patch

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 ..