Fixed issues with transformation functions on ANSIString.

This commit is contained in:
Jonathan Piacenti 2014-04-07 11:12:59 -05:00 committed by Griatch
parent 7fd47eb386
commit 834b039a0d
2 changed files with 12 additions and 1 deletions

View file

@ -110,3 +110,12 @@ class ANSIStringTestCase(TestCase):
ANSI codes.
"""
self.assertEqual(len(ANSIString('{gTest{n')), 4)
def test_capitalize(self):
"""
Make sure that capitalization works. This is the simplest of the
_transform functions.
"""
target = ANSIString('{gtest{n')
result = u'\x1b[1m\x1b[32mTest\x1b[0m'
self.checker(target.capitalize(), result, u'Test')