'Verifies that re.split and .split behave similarly and that color
codes end up where they should.'

def test_split(self):

    target = ANSIString('|gThis    is    |nA    split    string|g')
    first = (u'\x1b[1m\x1b[32mThis    is    \x1b[0m', u'This    is    ')
    second = (u'\x1b[1m\x1b[32m\x1b[0m    split    string\x1b[1m\x1b[32m', u'    split    string')
    re_split = re.split('A', target)
    normal_split = target.split('A')
    self.assertEqual(re_split, normal_split)
    self.assertEqual(len(normal_split), 2)
    self.checker(normal_split[0], *first)
    self.checker(normal_split[1], *second)
