'When in INSERT mode and upon receiving a keystroke with a printable
character, L{HistoricRecvLine} replaces the character at
the cursor with the typed character rather than inserting before.
Ah, the ironies of INSERT mode.'

def test_typeover(self):

    kR = (lambda ch: self.p.keystrokeReceived(ch, None))
    for ch in iterbytes('xyz'):
        kR(ch)
    kR(self.pt.INSERT)
    kR(self.pt.LEFT_ARROW)
    kR('A')
    self.assertEqual(self.p.currentLineBuffer(), ('xyA', ''))
    kR(self.pt.LEFT_ARROW)
    kR('B')
    self.assertEqual(self.p.currentLineBuffer(), ('xyB', ''))
