tests: add testing for diff.showfunc
The diff.showfunc config knob did not have coverage before.
--- a/tests/test-diff-unified.t Mon Mar 30 10:43:52 2015 -0700
+++ b/tests/test-diff-unified.t Tue Mar 24 21:36:38 2015 +0100
@@ -286,4 +286,51 @@
-b
+a
+showfunc diff
+ $ cat > f1 << EOF
+ > int main() {
+ > int a = 0;
+ > int b = 1;
+ > int c = 2;
+ > int d = 3;
+ > return a + b + c + d;
+ > }
+ > EOF
+ $ hg commit -m addfunction
+ $ cat > f1 << EOF
+ > int main() {
+ > int a = 0;
+ > int b = 1;
+ > int c = 2;
+ > int e = 3;
+ > return a + b + c + e;
+ > }
+ > EOF
+ $ hg diff --git
+ diff --git a/f1 b/f1
+ --- a/f1
+ +++ b/f1
+ @@ -2,6 +2,6 @@
+ int a = 0;
+ int b = 1;
+ int c = 2;
+ - int d = 3;
+ - return a + b + c + d;
+ + int e = 3;
+ + return a + b + c + e;
+ }
+ $ hg diff --config diff.showfunc=True --git
+ diff --git a/f1 b/f1
+ --- a/f1
+ +++ b/f1
+ @@ -2,6 +2,6 @@ int main() {
+ int a = 0;
+ int b = 1;
+ int c = 2;
+ - int d = 3;
+ - return a + b + c + d;
+ + int e = 3;
+ + return a + b + c + e;
+ }
+
$ cd ..