Backtracking unknown escape sequences, various tests for XTermParser

This commit is contained in:
Darren Burns
2022-06-09 16:27:53 +01:00
parent fe151a7f25
commit bfb962bacf
4 changed files with 190 additions and 6 deletions

View File

@@ -13,12 +13,10 @@ def test_read1():
on_token(data)
test_parser = TestParser()
test_data = "Where there is a Will there is a way!"
for size in range(1, len(test_data) + 1):
# Feed the parser in pieces, first 1 character at a time, then 2, etc
test_parser = TestParser()
data = []
for offset in range(0, len(test_data), size):
for chunk in test_parser.feed(test_data[offset : offset + size]):