Exemplo n.º 1
0
def test_process_prompt():
    from pyrepl.reader import Reader
    r = Reader(None)
    assert r.process_prompt("hi!") == ("hi!", 3)
    assert r.process_prompt("h\x01i\x02!") == ("hi!", 2)
    assert r.process_prompt("hi\033[11m!") == ("hi\033[11m!", 3)
    assert r.process_prompt("h\x01i\033[11m!\x02") == ("hi\033[11m!", 1)
    assert r.process_prompt("h\033[11m\x01i\x02!") == ("h\033[11mi!", 2)
Exemplo n.º 2
0
 def refresh(self):
     Reader.refresh(self)
     self.dirty = True
Exemplo n.º 3
0
 def refresh(self):
     Reader.refresh(self)
     self.dirty = True