Mercurial > hg-stable
changeset 24496:9a4ef1b18cae
tests: add testing for diff.showfunc
The diff.showfunc config knob did not have coverage before.
author | Mathias De Maré <mathias.demare@gmail.com> |
---|---|
date | Tue, 24 Mar 2015 21:36:38 +0100 |
parents | d2a3a2808974 |
children | 2e0301ac5c91 |
files | tests/test-diff-unified.t |
diffstat | 1 files changed, 47 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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 ..