--- a/tests/test-diff-color.t Mon May 01 16:43:43 2017 +0200
+++ b/tests/test-diff-color.t Tue May 02 20:01:54 2017 +0200
@@ -3,6 +3,7 @@
$ cat <<EOF >> $HGRCPATH
> [ui]
> color = always
+ > formatted = always
> [color]
> mode = ansi
> EOF
@@ -49,6 +50,38 @@
a
c
+(check that 'ui.color=yes' match '--color=auto')
+
+ $ hg diff --nodates --config ui.formatted=no
+ diff -r cf9f4ba66af2 a
+ --- a/a
+ +++ b/a
+ @@ -2,7 +2,7 @@
+ c
+ a
+ a
+ -b
+ +dd
+ a
+ a
+ c
+
+(check that 'ui.color=no' disable color)
+
+ $ hg diff --nodates --config ui.formatted=yes --config ui.color=no
+ diff -r cf9f4ba66af2 a
+ --- a/a
+ +++ b/a
+ @@ -2,7 +2,7 @@
+ c
+ a
+ a
+ -b
+ +dd
+ a
+ a
+ c
+
--unified=2
$ hg diff --nodates -U 2