view tests/test-ui-color.py @ 12698:7aef77e74cf3

util: make wrap() require a width argument This keeps hgweb's help engine from poking at file descriptors that don't exist.
author Matt Mackall <mpm@selenic.com>
date Sun, 10 Oct 2010 18:02:52 -0500
parents 386e56ecfb78
children 4c50552fc9bc
line wrap: on
line source

#!/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())