[PATCH] Make sure terminfo color tests work the same on all platforms
Mads Kiilerich
mads at kiilerich.com
Sun Jun 26 23:22:32 UTC 2011
Danek Duvall wrote, On 06/26/2011 02:30 AM:
> # HG changeset patch
> # User Danek Duvall<duvall at comfychair.org>
> # Date 1309048141 25200
> # Node ID 03a164145bcb6b99aff61a14b563ad53ae52a2df
> # Parent 13011330885637d05262f2abceb8098fe4b8884b
> Make sure terminfo color tests work the same on all platforms.
(btw: The subject line should according to ContributingChanges start
with 'tests:' and not end with '.'. A short description of what problem
this solves and why it was solved this way would be nice too.)
Yes, this works - at least on one solaris and one linux machine. Can
someone confirm that it works on other platforms too, such as OS/X and
other BSDs and AIX?
Is 'tic' always available on all (test-)supported platforms?
I am a bit worried whether it is relevant to run the test in such an
artificial environment if we know that the environment users have is
different and not good enough. I guess the answer is that terminfo
ensures that all environments are good enough even though they are
different. But then why do we issue a warning?
> diff --git a/tests/test-status-color.t b/tests/test-status-color.t
> --- a/tests/test-status-color.t
> +++ b/tests/test-status-color.t
> @@ -167,7 +167,9 @@ hg status -A:
>
> hg status -A (with terminfo color):
>
> - $ TERM=xterm hg status --config color.mode=terminfo --color=always -A
> + $ mkdir $TESTTMP/terminfo
> + $ TERMINFO=$TESTTMP/terminfo tic $TESTDIR/xterm-color.ti
> + $ TERM=xterm-color TERMINFO=$TESTTMP/terminfo hg status --config color.mode=terminfo --color=always -A
Would it make sense to rename xterm-color to something else so it isn't
confused with the 'real' xterm-color that is available on most platforms?
/Mads
More information about the Mercurial-devel
mailing list