[PATCH] tests: test-ui-color.py fails from a dumb terminal
Matt Mackall
mpm at selenic.com
Fri May 4 16:50:41 CDT 2012
On Fri, 2012-05-04 at 16:17 -0400, Jesse Glick wrote:
> # HG changeset patch
> # User Jesse Glick <jesse.glick at oracle.com>
> # Date 1336162605 14400
> # Branch stable
> # Node ID a7e7d9b1ecec7359d15018327cac3b428697af32
> # Parent 00182b3d087909e3c3ae44761efecdde8f319ef3
> tests: test-ui-color.py fails from a dumb terminal
>
> When running emacs23-x shell-mode, test-ui-color.py fails. Need to skip in this
> environment, while continuing to run when invoked from a colorizing full
> terminal.
I think run-tests should either eliminate or standardize the TERM
variable instead?
> diff --git a/tests/test-ui-color.py b/tests/test-ui-color.py
> --- a/tests/test-ui-color.py
> +++ b/tests/test-ui-color.py
> @@ -2,6 +2,10 @@
> from hgext import color
> from mercurial import dispatch, ui
>
> +if os.environ['TERM'] == 'dumb':
> + print 'skipped: dumb terminal'
> + sys.exit(80)
> +
> # ensure errors aren't buffered
> testui = color.colorui()
> testui.pushbuffer()
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel
mailing list