changeset 13997:b083d00578bf

test-status-color: fix terminfo code compatibility problem On a linux host in xterm mode, 'none' is translated to: \x1b[m\x1b(B While it is the following on osx: \x1b(B\x1b[m Take advantage of the new color.color.X option to force it to a common value.
author Patrick Mezard <pmezard@gmail.com>
date Sun, 24 Apr 2011 23:06:18 +0200
parents 1cafa0426a1a
children 14c7526fed89
files tests/test-status-color.t
diffstat 1 files changed, 11 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-status-color.t	Fri Apr 22 16:43:06 2011 +0200
+++ b/tests/test-status-color.t	Sun Apr 24 23:06:18 2011 +0200
@@ -2,6 +2,8 @@
   $ echo "color=" >> $HGRCPATH
   $ echo "[color]" >> $HGRCPATH
   $ echo "mode=ansi" >> $HGRCPATH
+Terminfo codes compatibility fix
+  $ echo "color.none=0" >> $HGRCPATH
 
   $ hg init repo1
   $ cd repo1
@@ -166,15 +168,15 @@
 hg status -A (with terminfo color):
 
   $ TERM=xterm hg status --config color.mode=terminfo --color=always -A
-  \x1b(B\x1b[m\x1b[32m\x1b[1mA added\x1b(B\x1b[m (esc)
-  \x1b(B\x1b[m\x1b[32m\x1b[1mA copied\x1b(B\x1b[m (esc)
-  \x1b(B\x1b[m\x1b(B\x1b[m  modified\x1b(B\x1b[m (esc)
-  \x1b(B\x1b[m\x1b[31m\x1b[1mR removed\x1b(B\x1b[m (esc)
-  \x1b(B\x1b[m\x1b[36m\x1b[1m\x1b[4m! deleted\x1b(B\x1b[m (esc)
-  \x1b(B\x1b[m\x1b[35m\x1b[1m\x1b[4m? unknown\x1b(B\x1b[m (esc)
-  \x1b(B\x1b[m\x1b[30m\x1b[1mI ignored\x1b(B\x1b[m (esc)
-  \x1b(B\x1b[m\x1b(B\x1b[mC .hgignore\x1b(B\x1b[m (esc)
-  \x1b(B\x1b[m\x1b(B\x1b[mC modified\x1b(B\x1b[m (esc)
+  \x1b[30m\x1b[32m\x1b[1mA added\x1b[30m (esc)
+  \x1b[30m\x1b[32m\x1b[1mA copied\x1b[30m (esc)
+  \x1b[30m\x1b[30m  modified\x1b[30m (esc)
+  \x1b[30m\x1b[31m\x1b[1mR removed\x1b[30m (esc)
+  \x1b[30m\x1b[36m\x1b[1m\x1b[4m! deleted\x1b[30m (esc)
+  \x1b[30m\x1b[35m\x1b[1m\x1b[4m? unknown\x1b[30m (esc)
+  \x1b[30m\x1b[30m\x1b[1mI ignored\x1b[30m (esc)
+  \x1b[30m\x1b[30mC .hgignore\x1b[30m (esc)
+  \x1b[30m\x1b[30mC modified\x1b[30m (esc)
 
 
   $ echo "^ignoreddir$" > .hgignore