(self)
| 33 | self.assertEqual(str_width(c), 2) |
| 34 | |
| 35 | def test_wlen(self): |
| 36 | for c in ['a', 'b', '1', '!', '_']: |
| 37 | self.assertEqual(wlen(c), 1) |
| 38 | self.assertEqual(wlen('\x1a'), 2) |
| 39 | |
| 40 | char_east_asian_width_N = chr(3800) |
| 41 | self.assertEqual(wlen(char_east_asian_width_N), 1) |
| 42 | char_east_asian_width_W = chr(4352) |
| 43 | self.assertEqual(wlen(char_east_asian_width_W), 2) |
| 44 | |
| 45 | self.assertEqual(wlen('hello'), 5) |
| 46 | self.assertEqual(wlen('hello' + '\x1a'), 7) |
| 47 | self.assertEqual(wlen('e\N{COMBINING ACUTE ACCENT}'), 1) |
| 48 | self.assertEqual(wlen('a\N{ZERO WIDTH JOINER}b'), 2) |
| 49 | |
| 50 | def test_prev_next_window(self): |
| 51 | def gen_normal(): |
nothing calls this directly
no test coverage detected