Mercurial > public > mercurial-scm > hg
diff tests/test-progress.t @ 13142:e9827c85c50b
progress: test setting progress.width
This also makes the tests readable in a 80-character terminal which is
why I made the change to both tests.
author | Martin Geisler <mg@aragost.com> |
---|---|
date | Wed, 15 Dec 2010 16:35:09 +0100 |
parents | 6cfe17c19ba2 |
children | ce4cd176634e |
line wrap: on
line diff
--- a/tests/test-progress.t Wed Dec 15 16:29:46 2010 +0100 +++ b/tests/test-progress.t Wed Dec 15 16:35:09 2010 +0100 @@ -28,6 +28,7 @@ $ echo "loop=`pwd`/loop.py" >> $HGRCPATH $ echo "[progress]" >> $HGRCPATH $ echo "assume-tty=1" >> $HGRCPATH + $ echo "width=60" >> $HGRCPATH test default params, display nothing because of delay @@ -40,10 +41,10 @@ $ hg -y loop 3 2>&1 | $TESTDIR/filtercr.py - loop [ ] 0/3 - loop [=====================> ] 1/3 - loop [============================================> ] 2/3 - \r (esc) + loop [ ] 0/3 + loop [===============> ] 1/3 + loop [===============================> ] 2/3 + \r (esc) test refresh is taken in account @@ -57,37 +58,37 @@ 0/2 loop lo 1/2 loop lo - \r (esc) + \r (esc) test format options 2 $ hg -y --config 'progress.format=number item-3 bar' loop 2 2>&1 \ > | $TESTDIR/filtercr.py - 0/2 p.0 [ ] - 1/2 p.1 [=================================> ] - \r (esc) + 0/2 p.0 [ ] + 1/2 p.1 [=======================> ] + \r (esc) test format options and indeterminate progress $ hg -y --config 'progress.format=number item bar' loop -- -2 2>&1 \ > | $TESTDIR/filtercr.py - 0 loop.0 [ <=> ] - 1 loop.1 [ <=> ] - \r (esc) + 0 loop.0 [ <=> ] + 1 loop.1 [ <=> ] + \r (esc) make sure things don't fall over if count > total $ hg -y loop --total 4 6 2>&1 | $TESTDIR/filtercr.py - loop [ ] 0/4 - loop [================> ] 1/4 - loop [=================================> ] 2/4 - loop [==================================================> ] 3/4 - loop [===================================================================>] 4/4 - loop [ <=> ] 5/4 - \r (esc) + loop [ ] 0/4 + loop [===========> ] 1/4 + loop [=======================> ] 2/4 + loop [===================================> ] 3/4 + loop [===============================================>] 4/4 + loop [ <=> ] 5/4 + \r (esc) test immediate progress completion