Skip to content

Commit bacd13d

Browse files
committed
extra cursors: Add some tests for invalid input handling
1 parent 1c9a2da commit bacd13d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

kitty_tests/screen.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1626,6 +1626,13 @@ def a(which: int, *positions: tuple[int, int], region=None) -> dict[int, tuple[i
16261626
self.ae(a(2, (1, 2), (1, 3)), {-1: {(2, 3), (2, 2)}, 2: {(1, 2), (1, 3)}})
16271627
self.ae(a(0, (1, 2), (2, 3)), {-1: {(2, 2)}, 2: {(1, 3)}})
16281628
self.ae(a(0, region=True), {})
1629+
s.cursor.x, s.cursor.y = 1, 2
1630+
parse_bytes(s, b'\x1b[>3;0 q') # ]
1631+
self.ae(current(), {3: {(1, 2)}})
1632+
parse_bytes(s, b'\x1b[>3;2:3 q') # ]
1633+
self.ae(current(), {3: {(1, 2)}})
1634+
parse_bytes(s, b'\x1b[>0;4:3:1:4 q') # ]
1635+
self.ae(current(), {})
16291636

16301637

16311638
def detect_url(self, scale=1):

0 commit comments

Comments
 (0)