|
@@ 56-67 (lines=12) @@
|
| 53 |
|
assert Key.parse(nvim, expr).char == '<' |
| 54 |
|
|
| 55 |
|
|
| 56 |
|
def test_Key_parse_with_bytes_special_key_constant_bytes(nvim): |
| 57 |
|
expr = b'<BACKSPACE>' |
| 58 |
|
assert Key.parse(nvim, expr).code == b'\x80kb' |
| 59 |
|
assert Key.parse(nvim, expr).char == '' |
| 60 |
|
|
| 61 |
|
expr = b'<DELETE>' |
| 62 |
|
assert Key.parse(nvim, expr).code == b'\x80kD' |
| 63 |
|
assert Key.parse(nvim, expr).char == '' |
| 64 |
|
|
| 65 |
|
expr = b'<INSERT>' |
| 66 |
|
assert Key.parse(nvim, expr).code == b'\x80kI' |
| 67 |
|
assert Key.parse(nvim, expr).char == '' |
| 68 |
|
|
| 69 |
|
|
| 70 |
|
def test_Key_parse_with_bytes_special_key_ctrl(nvim): |
|
@@ 42-53 (lines=12) @@
|
| 39 |
|
assert Key.parse(nvim, expr).char == '<prompt:accept>' |
| 40 |
|
|
| 41 |
|
|
| 42 |
|
def test_Key_parse_with_bytes_special_key_constant_int(nvim): |
| 43 |
|
expr = b'<CR>' |
| 44 |
|
assert Key.parse(nvim, expr).code == ascii.CR |
| 45 |
|
assert Key.parse(nvim, expr).char == '\r' |
| 46 |
|
|
| 47 |
|
expr = b'<BSLASH>' |
| 48 |
|
assert Key.parse(nvim, expr).code == ord('\\') |
| 49 |
|
assert Key.parse(nvim, expr).char == '\\' |
| 50 |
|
|
| 51 |
|
expr = b'<LT>' |
| 52 |
|
assert Key.parse(nvim, expr).code == ord('<') |
| 53 |
|
assert Key.parse(nvim, expr).char == '<' |
| 54 |
|
|
| 55 |
|
|
| 56 |
|
def test_Key_parse_with_bytes_special_key_constant_bytes(nvim): |