# HG changeset patch # User Mathias De Maré # Date 1427229398 -3600 # Node ID 9a4ef1b18cae8b9079dcaca6f722ca1a77a0bb7d # Parent d2a3a2808974fabb3df2aff55f71d1b5de39ed56 tests: add testing for diff.showfunc The diff.showfunc config knob did not have coverage before. diff -r d2a3a2808974 -r 9a4ef1b18cae tests/test-diff-unified.t --- 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 ..