From 9034aa5d58231fbf16540da1d9a280f37a217bcc Mon Sep 17 00:00:00 2001 From: Guillaume Ayoub Date: Sun, 4 Feb 2018 09:54:54 +0100 Subject: [PATCH] Regression test for #560 --- weasyprint/tests/test_layout.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/weasyprint/tests/test_layout.py b/weasyprint/tests/test_layout.py index 10578389..48767f17 100644 --- a/weasyprint/tests/test_layout.py +++ b/weasyprint/tests/test_layout.py @@ -709,6 +709,21 @@ def test_breaking_linebox(): assert textbox_2.text == 'c def' assert textbox_3.text == 'g hi' + # Regression test for https://github.com/Kozea/WeasyPrint/issues/560 + page, = parse( + '
' + 'aaaa aaaa a [aaa]') + html, = page.children + body, = html.children + pre, = body.children + line1, line2, line3, line4 = pre.children + assert line1.children[0].text == line2.children[0].text == 'aaaa' + assert line3.children[0].text == 'a' + text1, span, text2 = line4.children + assert text1.text == '[' + assert text2.text == ']' + assert span.children[0].text == 'aaa' + @assert_no_logs def test_linebox_text():