From b080fc209ac1ec3ec71092f4c66283baabb199f1 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 16 Jul 2019 14:17:06 -0400 Subject: Add another layout test This tests a situation in which we had a crash until recently: Multiple paragraphs, with no-break attributes. We used to free the no-break attribute list prematurely. --- tests/layouts/valid-5.expected | 48 ++++++++++++++++++++++++++++++++++++++++++ tests/layouts/valid-5.markup | 3 +++ 2 files changed, 51 insertions(+) create mode 100644 tests/layouts/valid-5.expected create mode 100644 tests/layouts/valid-5.markup diff --git a/tests/layouts/valid-5.expected b/tests/layouts/valid-5.expected new file mode 100644 index 00000000..5c6fa749 --- /dev/null +++ b/tests/layouts/valid-5.expected @@ -0,0 +1,48 @@ +A test with multiple paragraphs and with no-break attributes, which might trigger a crash. +If it doesn't the fix has worked. + +--- parameters + +wrapped: 1 +ellipsized: 0 +lines: 7 +width: 194560 + +--- attributes + +range 0 21 +range 21 31 +[21,31]font-features=tnum=1 +range 31 2147483647 + +--- lines + +i=1, index=0, paragraph-start=1, dir=ltr 'A test with multiple ' +i=2, index=21, paragraph-start=0, dir=ltr 'paragraphs and with no-' +i=3, index=44, paragraph-start=0, dir=ltr 'break attributes, which ' +i=4, index=68, paragraph-start=0, dir=ltr 'might trigger a crash. +' +i=5, index=91, paragraph-start=1, dir=ltr 'If it doesn't the fix has ' +i=6, index=117, paragraph-start=0, dir=ltr 'worked. +' +i=7, index=125, paragraph-start=1, dir=ltr '' + +--- runs + +i=1, index=0, chars=21, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'A test with multiple ' +[21,31]font-features=tnum=1 +i=2, index=21, no run, line end +i=3, index=21, chars=23, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'paragraphs and with no-' +[21,31]font-features=tnum=1 +i=4, index=44, no run, line end +i=5, index=44, chars=24, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'break attributes, which ' +[21,31]font-features=tnum=1 +i=6, index=68, no run, line end +i=7, index=68, chars=22, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'might trigger a crash.' +[21,31]font-features=tnum=1 +i=8, index=90, no run, line end +i=9, index=91, chars=26, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'If it doesn't the fix has ' +i=10, index=117, no run, line end +i=11, index=117, chars=7, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'worked.' +i=12, index=124, no run, line end +i=13, index=125, no run, line end diff --git a/tests/layouts/valid-5.markup b/tests/layouts/valid-5.markup new file mode 100644 index 00000000..2b2023ad --- /dev/null +++ b/tests/layouts/valid-5.markup @@ -0,0 +1,3 @@ +width=190 +A test with multiple paragraphs and with no-break attributes, which might trigger a crash. +If it doesn't the fix has worked. -- cgit v1.2.1