From d3883c4428cbecf498bdd6d8982c626fe2d60745 Mon Sep 17 00:00:00 2001 From: Guillaume Ayoub Date: Sun, 22 May 2022 19:09:04 +0200 Subject: [PATCH] Test nested line-clamp --- tests/draw/test_text.py | 78 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/tests/draw/test_text.py b/tests/draw/test_text.py index b59757f9..b008b15f 100644 --- a/tests/draw/test_text.py +++ b/tests/draw/test_text.py @@ -294,6 +294,84 @@ def test_line_clamp_number(assert_pixels): ''') +def test_line_clamp_nested(assert_pixels): + assert_pixels(''' + BBBB__BB__ + BBBB__BB__ + BBBB__BB__ + BBBB__BB__ + BBBBBBBBBB + BBBBBBBBBB + __________ + __________ + __________ + __________ + ''', ''' + + +
+ aa a +

+ bb b + cc c + dddd + eeee + ffff + gggg + hhhh +

+
+ ''') + + +def test_line_clamp_nested_after(assert_pixels): + assert_pixels(''' + BBBB__BB__ + BBBB__BB__ + BBBB__BB__ + BBBB__BB__ + BBBBBBBBBB + BBBBBBBBBB + __________ + __________ + __________ + __________ + ''', ''' + + +
+ aa a +

+ bb b +

+ cc c + dddd + eeee + ffff + gggg + hhhh +
+ ''') + + @pytest.mark.xfail def test_ellipsis_nested(assert_pixels): assert_pixels('''