Mercurial > hg
annotate tests/test-ui-color.py @ 11852:b2f91119bf8c
tests: unify test-annotate
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Sat, 14 Aug 2010 02:18:17 +0200 |
parents | 386e56ecfb78 |
children | 4c50552fc9bc |
rev | line source |
---|---|
11732
386e56ecfb78
color: call correct superclass method in write_err
Brodie Rao <brodie@bitheap.org>
parents:
diff
changeset
|
1 #!/usr/bin/env python |
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 from hgext import color |
386e56ecfb78
color: call correct superclass method in write_err
Brodie Rao <brodie@bitheap.org>
parents:
diff
changeset
|
4 |
386e56ecfb78
color: call correct superclass method in write_err
Brodie Rao <brodie@bitheap.org>
parents:
diff
changeset
|
5 # ensure errors aren't buffered |
386e56ecfb78
color: call correct superclass method in write_err
Brodie Rao <brodie@bitheap.org>
parents:
diff
changeset
|
6 testui = color.colorui() |
386e56ecfb78
color: call correct superclass method in write_err
Brodie Rao <brodie@bitheap.org>
parents:
diff
changeset
|
7 testui.pushbuffer() |
386e56ecfb78
color: call correct superclass method in write_err
Brodie Rao <brodie@bitheap.org>
parents:
diff
changeset
|
8 testui.write('buffered\n') |
386e56ecfb78
color: call correct superclass method in write_err
Brodie Rao <brodie@bitheap.org>
parents:
diff
changeset
|
9 testui.warn('warning\n') |
386e56ecfb78
color: call correct superclass method in write_err
Brodie Rao <brodie@bitheap.org>
parents:
diff
changeset
|
10 testui.write_err('error\n') |
386e56ecfb78
color: call correct superclass method in write_err
Brodie Rao <brodie@bitheap.org>
parents:
diff
changeset
|
11 print repr(testui.popbuffer()) |