tests/test-status-color.t
changeset 13997 b083d00578bf
parent 13987 e0f07847f8de
child 14757 f0b047a24c57
equal deleted inserted replaced
13996:1cafa0426a1a 13997:b083d00578bf
     1   $ echo "[extensions]" >> $HGRCPATH
     1   $ echo "[extensions]" >> $HGRCPATH
     2   $ echo "color=" >> $HGRCPATH
     2   $ echo "color=" >> $HGRCPATH
     3   $ echo "[color]" >> $HGRCPATH
     3   $ echo "[color]" >> $HGRCPATH
     4   $ echo "mode=ansi" >> $HGRCPATH
     4   $ echo "mode=ansi" >> $HGRCPATH
       
     5 Terminfo codes compatibility fix
       
     6   $ echo "color.none=0" >> $HGRCPATH
     5 
     7 
     6   $ hg init repo1
     8   $ hg init repo1
     7   $ cd repo1
     9   $ cd repo1
     8   $ mkdir a b a/1 b/1 b/2
    10   $ mkdir a b a/1 b/1 b/2
     9   $ touch in_root a/in_a b/in_b a/1/in_a_1 b/1/in_b_1 b/2/in_b_2
    11   $ touch in_root a/in_a b/in_b a/1/in_a_1 b/1/in_b_1 b/2/in_b_2
   164   \x1b[0;0mC modified\x1b[0m (esc)
   166   \x1b[0;0mC modified\x1b[0m (esc)
   165 
   167 
   166 hg status -A (with terminfo color):
   168 hg status -A (with terminfo color):
   167 
   169 
   168   $ TERM=xterm hg status --config color.mode=terminfo --color=always -A
   170   $ TERM=xterm hg status --config color.mode=terminfo --color=always -A
   169   \x1b(B\x1b[m\x1b[32m\x1b[1mA added\x1b(B\x1b[m (esc)
   171   \x1b[30m\x1b[32m\x1b[1mA added\x1b[30m (esc)
   170   \x1b(B\x1b[m\x1b[32m\x1b[1mA copied\x1b(B\x1b[m (esc)
   172   \x1b[30m\x1b[32m\x1b[1mA copied\x1b[30m (esc)
   171   \x1b(B\x1b[m\x1b(B\x1b[m  modified\x1b(B\x1b[m (esc)
   173   \x1b[30m\x1b[30m  modified\x1b[30m (esc)
   172   \x1b(B\x1b[m\x1b[31m\x1b[1mR removed\x1b(B\x1b[m (esc)
   174   \x1b[30m\x1b[31m\x1b[1mR removed\x1b[30m (esc)
   173   \x1b(B\x1b[m\x1b[36m\x1b[1m\x1b[4m! deleted\x1b(B\x1b[m (esc)
   175   \x1b[30m\x1b[36m\x1b[1m\x1b[4m! deleted\x1b[30m (esc)
   174   \x1b(B\x1b[m\x1b[35m\x1b[1m\x1b[4m? unknown\x1b(B\x1b[m (esc)
   176   \x1b[30m\x1b[35m\x1b[1m\x1b[4m? unknown\x1b[30m (esc)
   175   \x1b(B\x1b[m\x1b[30m\x1b[1mI ignored\x1b(B\x1b[m (esc)
   177   \x1b[30m\x1b[30m\x1b[1mI ignored\x1b[30m (esc)
   176   \x1b(B\x1b[m\x1b(B\x1b[mC .hgignore\x1b(B\x1b[m (esc)
   178   \x1b[30m\x1b[30mC .hgignore\x1b[30m (esc)
   177   \x1b(B\x1b[m\x1b(B\x1b[mC modified\x1b(B\x1b[m (esc)
   179   \x1b[30m\x1b[30mC modified\x1b[30m (esc)
   178 
   180 
   179 
   181 
   180   $ echo "^ignoreddir$" > .hgignore
   182   $ echo "^ignoreddir$" > .hgignore
   181   $ mkdir ignoreddir
   183   $ mkdir ignoreddir
   182   $ touch ignoreddir/file
   184   $ touch ignoreddir/file