mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-16 13:34:48 +02:00
Add tests for ch_and_idx
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
# License: GPLv3 Copyright: 2024, Kovid Goyal <kovid at kovidgoyal.net>
|
||||
|
||||
|
||||
from kitty.fast_data_types import TEXT_SIZE_CODE, wcswidth
|
||||
from kitty.fast_data_types import TEXT_SIZE_CODE, wcswidth, test_ch_and_idx
|
||||
|
||||
from . import BaseTest, parse_bytes
|
||||
from . import draw_multicell as multicell
|
||||
@@ -37,6 +37,13 @@ def test_multicell(self: TestMulticell) -> None:
|
||||
if assertions[key] != val:
|
||||
raise AssertionError(f'{msg}{assertions[key]!r} != {val!r}')
|
||||
|
||||
self.ae(test_ch_and_idx(0), (0, 0, 0))
|
||||
self.ae(test_ch_and_idx(1), (0, 1, 1))
|
||||
self.ae(test_ch_and_idx(0x80000000), (1, 0, 0x80000000))
|
||||
self.ae(test_ch_and_idx(0x80000001), (1, 1, 0x80000001))
|
||||
self.ae(test_ch_and_idx((1, 0)), (1, 0, 0x80000000))
|
||||
self.ae(test_ch_and_idx((1, 3)), (1, 3, 0x80000003))
|
||||
|
||||
ae('x')
|
||||
ae('y')
|
||||
ae('width')
|
||||
|
||||
Reference in New Issue
Block a user