tests/test-ui-color.py
author Matt Mackall <mpm@selenic.com>
Fri, 01 Oct 2010 10:16:52 -0500
branchstable
changeset 12609 93d8bff78c96
parent 11732 386e56ecfb78
child 12865 4c50552fc9bc
permissions -rw-r--r--
merge with i18n
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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())