    def test_cjk_glyphs(self):
        """
        Check that CJK languages track double-width glyphs as expected.
        """
        screen = MagicMock(spec=Screen, colours=8, unicode_aware=True)
        canvas = Canvas(screen, 10, 40, 0, 0)

        # Check underflow and overflow work as expected for CJK languages.
        # These languages actually use two characters for some glyphs, so when you query the
        # contents, you will see the value for both characters.  Also, most terminals don't like
        # displaying half glyphs, so asciimatics doesn't even allow it.
        canvas.print_at("ab", -1, 0)
        canvas.print_at("cd", canvas.width - 1, 0)
        self.assert_line_equals(canvas, "b                                      c")

        canvas.reset()
        canvas.print_at("你確", -1, 0)
        canvas.print_at("你確", canvas.width - 1, 0)
        self.assert_line_equals(canvas, " 確確                                     ")
Check that CJK languages track double-width glyphs as expected.
tests/test_screen.py