Mercurial > public > mercurial-scm > hg
diff tests/test-diff-color.t @ 32103:9a98023ac8db stable
color: special case 'always' in 'ui.color'
This lift the confusing case, where 'ui.color=always' would actually not always
use color.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Tue, 02 May 2017 20:19:09 +0200 |
parents | 9a85ea1daf49 |
children | 1add41fc3c62 |
line wrap: on
line diff
--- a/tests/test-diff-color.t Tue May 02 20:01:54 2017 +0200 +++ b/tests/test-diff-color.t Tue May 02 20:19:09 2017 +0200 @@ -2,7 +2,7 @@ $ cat <<EOF >> $HGRCPATH > [ui] - > color = always + > color = yes > formatted = always > [color] > mode = ansi @@ -82,6 +82,22 @@ a c +(check that 'ui.color=always' force color) + + $ hg diff --nodates --config ui.formatted=no --config ui.color=always + \x1b[0;1mdiff -r cf9f4ba66af2 a\x1b[0m (esc) + \x1b[0;31;1m--- a/a\x1b[0m (esc) + \x1b[0;32;1m+++ b/a\x1b[0m (esc) + \x1b[0;35m@@ -2,7 +2,7 @@\x1b[0m (esc) + c + a + a + \x1b[0;31m-b\x1b[0m (esc) + \x1b[0;32m+dd\x1b[0m (esc) + a + a + c + --unified=2 $ hg diff --nodates -U 2