Mercurial > hg
annotate tests/test-ui-color.py @ 14503:4e958f2a193f stable
httprepo: proper handling of invalid responses without content-type (issue2019)
This can currently be tested on http://sf.net/
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Mon, 07 Mar 2011 14:47:30 +0100 |
parents | 4c50552fc9bc |
children | 842a9179132c |
rev | line source |
---|---|
11732
386e56ecfb78
color: call correct superclass method in write_err
Brodie Rao <brodie@bitheap.org>
parents:
diff
changeset
|
1 from hgext import color |
386e56ecfb78
color: call correct superclass method in write_err
Brodie Rao <brodie@bitheap.org>
parents:
diff
changeset
|
2 |
386e56ecfb78
color: call correct superclass method in write_err
Brodie Rao <brodie@bitheap.org>
parents:
diff
changeset
|
3 # ensure errors aren't buffered |
386e56ecfb78
color: call correct superclass method in write_err
Brodie Rao <brodie@bitheap.org>
parents:
diff
changeset
|
4 testui = color.colorui() |
386e56ecfb78
color: call correct superclass method in write_err
Brodie Rao <brodie@bitheap.org>
parents:
diff
changeset
|
5 testui.pushbuffer() |
386e56ecfb78
color: call correct superclass method in write_err
Brodie Rao <brodie@bitheap.org>
parents:
diff
changeset
|
6 testui.write('buffered\n') |
386e56ecfb78
color: call correct superclass method in write_err
Brodie Rao <brodie@bitheap.org>
parents:
diff
changeset
|
7 testui.warn('warning\n') |
386e56ecfb78
color: call correct superclass method in write_err
Brodie Rao <brodie@bitheap.org>
parents:
diff
changeset
|
8 testui.write_err('error\n') |
386e56ecfb78
color: call correct superclass method in write_err
Brodie Rao <brodie@bitheap.org>
parents:
diff
changeset
|
9 print repr(testui.popbuffer()) |