[PATCH 2 of 8] tests: add testing for diff.showfunc
Mathias De Maré
mathias.demare at gmail.com
Sat Mar 28 05:51:02 CDT 2015
# HG changeset patch
# User Mathias De Maré <mathias.demare at gmail.com>
# Date 1427229398 -3600
# Tue Mar 24 21:36:38 2015 +0100
# Node ID 96a2ed2e01ef6033b74becfde0f79d5b61adbf11
# Parent 60bbe7ef868927b8a8240bbcc981c66bc1480210
tests: add testing for diff.showfunc
The diff.showfunc config knob did not have coverage before.
diff --git a/tests/test-diff-unified.t b/tests/test-diff-unified.t
--- a/tests/test-diff-unified.t
+++ b/tests/test-diff-unified.t
@@ -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 ..
More information about the Mercurial-devel
mailing list