Mercurial > public > mercurial-scm > hg-stable
diff tests/test-progress @ 10891:83af68e38be3
progress: fall back to indeterminate progress if position is >= total
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Thu, 08 Apr 2010 15:04:00 -0500 |
parents | ca6ba6cac6cd |
children |
line wrap: on
line diff
--- a/tests/test-progress Sun Apr 11 14:25:02 2010 -0500 +++ b/tests/test-progress Thu Apr 08 15:04:00 2010 -0500 @@ -8,6 +8,8 @@ total = None if loops >= 0: total = loops + if opts.get('total', None): + total = int(opts.get('total')) loops = abs(loops) for i in range(loops): @@ -17,7 +19,8 @@ commands.norepo += " loop" cmdtable = { - "loop": (loop, [], 'hg loop LOOPS'), + "loop": (loop, [('', 'total', '', 'override for total')], + 'hg loop LOOPS'), } EOF @@ -55,5 +58,8 @@ echo '% test format options and indeterminate progress' hg -y --config 'progress.format=number item bar' loop -- -2 2>&1 | python filtercr.py +echo "% make sure things don't fall over if count > total" +hg -y loop --total 4 6 2>&1 | python filtercr.py + echo '% test immediate progress completion' hg -y loop 0 2>&1 | python filtercr.py