tests/test-ui-color.py
author Martin Geisler <mg@lazybytes.net>
Sun, 15 Aug 2010 17:42:44 +0200
changeset 11883 01e04df696e3
parent 11732 386e56ecfb78
child 12865 4c50552fc9bc
permissions -rw-r--r--
test-init: replace 'echo -n' with 'printf' The '-n' argument to echo is a non-standard extension that isn't supported on Mac OS X 10.6.

#!/usr/bin/env python

from hgext import color

# ensure errors aren't buffered
testui = color.colorui()
testui.pushbuffer()
testui.write('buffered\n')
testui.warn('warning\n')
testui.write_err('error\n')
print repr(testui.popbuffer())