[PATCH 2 of 8] tests: add testing for diff.showfunc
Augie Fackler
raf at durin42.com
Mon Mar 30 09:25:06 CDT 2015
On Sat, Mar 28, 2015 at 05:51:02AM -0500, Mathias De Maré wrote:
> # 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.
I've queued this patch as it's uncontroversial.
>
> 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 ..
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
More information about the Mercurial-devel
mailing list