summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-07-07 20:31:54 -0400
committerMatthias Clasen <mclasen@redhat.com>2021-07-07 20:41:57 -0400
commitcb409bc6a52bd30845bbef10e35aefa6e1d32a0d (patch)
treec1e3fd7b7d41db4765cab1edb41386667c024994
parent628c950fa07e31d01f33c1a17e6772f5b870e847 (diff)
downloadpango-cb409bc6a52bd30845bbef10e35aefa6e1d32a0d.tar.gz
tests: Add some more layout tests
-rw-r--r--tests/layouts/valid-17.expected35
-rw-r--r--tests/layouts/valid-17.markup2
-rw-r--r--tests/layouts/valid-18.expected40
-rw-r--r--tests/layouts/valid-18.markup2
-rw-r--r--tests/layouts/valid-19.expected46
-rw-r--r--tests/layouts/valid-19.markup2
6 files changed, 127 insertions, 0 deletions
diff --git a/tests/layouts/valid-17.expected b/tests/layouts/valid-17.expected
new file mode 100644
index 00000000..4b3192fb
--- /dev/null
+++ b/tests/layouts/valid-17.expected
@@ -0,0 +1,35 @@
+some|bla|bla|bla
+
+--- parameters
+
+wrapped: 1
+ellipsized: 0
+lines: 3
+width: 102400
+
+--- attributes
+
+range 0 2147483647
+
+--- directions
+
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+
+--- cursor positions
+
+0(0) 1(0) 2(0) 3(0) 4(0) 5(0) 6(0) 7(0) 8(0) 9(0) 10(0) 11(0) 12(0) 12(1) 14(0) 15(0) 15(1) 17(0)
+
+--- lines
+
+i=1, index=0, paragraph-start=1, dir=ltr 'some|bla|bla|'
+i=2, index=13, paragraph-start=0, dir=ltr 'bla
+'
+i=3, index=17, paragraph-start=1, dir=ltr ''
+
+--- runs
+
+i=1, index=0, chars=13, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'some|bla|bla|'
+i=2, index=13, no run, line end
+i=3, index=13, chars=3, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'bla'
+i=4, index=16, no run, line end
+i=5, index=17, no run, line end
diff --git a/tests/layouts/valid-17.markup b/tests/layouts/valid-17.markup
new file mode 100644
index 00000000..d804c20a
--- /dev/null
+++ b/tests/layouts/valid-17.markup
@@ -0,0 +1,2 @@
+justify=true,width=100
+some|bla|bla|bla
diff --git a/tests/layouts/valid-18.expected b/tests/layouts/valid-18.expected
new file mode 100644
index 00000000..614321b3
--- /dev/null
+++ b/tests/layouts/valid-18.expected
@@ -0,0 +1,40 @@
+some line breaks
and mis­ce­llaneous ignora‌bles
+
+--- parameters
+
+wrapped: 1
+ellipsized: 0
+lines: 3
+
+--- attributes
+
+range 0 57
+[0,57]show=7
+range 57 2147483647
+
+--- directions
+
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+
+--- cursor positions
+
+0(0) 1(0) 2(0) 3(0) 4(0) 5(0) 6(0) 7(0) 8(0) 9(0) 10(0) 11(0) 12(0) 13(0) 14(0) 15(0) 16(0) 16(1) 20(0) 21(0) 22(0) 23(0) 24(0) 25(0) 26(0) 28(0) 29(0) 30(0) 32(0) 33(0) 34(0) 35(0) 36(0) 37(0) 38(0) 39(0) 40(0) 41(0) 42(0) 43(0) 46(0) 47(0) 48(0) 49(0) 53(0) 54(0) 55(0) 56(0) 56(1) 58(0)
+
+--- lines
+
+i=1, index=0, paragraph-start=1, dir=ltr 'some line breaks
'
+i=2, index=19, paragraph-start=0, dir=ltr 'and mis­ce­llaneous ignora‌bles
+'
+i=3, index=58, paragraph-start=1, dir=ltr ''
+
+--- runs
+
+i=1, index=0, chars=16, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'some line breaks'
+[0,57]show=7
+i=2, index=16, chars=1, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, '
'
+[0,57]show=7
+i=3, index=19, no run, line end
+i=4, index=19, chars=32, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'and mis­ce­llaneous ignora‌bles'
+[0,57]show=7
+i=5, index=57, no run, line end
+i=6, index=58, no run, line end
diff --git a/tests/layouts/valid-18.markup b/tests/layouts/valid-18.markup
new file mode 100644
index 00000000..ab5f5f35
--- /dev/null
+++ b/tests/layouts/valid-18.markup
@@ -0,0 +1,2 @@
+
+<span show="spaces|line-breaks|ignorables">some line breaks
and mis­ce­llaneous ignora‌bles</span>
diff --git a/tests/layouts/valid-19.expected b/tests/layouts/valid-19.expected
new file mode 100644
index 00000000..cf7f3820
--- /dev/null
+++ b/tests/layouts/valid-19.expected
@@ -0,0 +1,46 @@
+ a⃠ 😊︎ 😊️ 🇩🇪 ✊ ✋🏾 0 # 🏴󠁵󠁳󠁣󠁡󠁿 ©
+
+--- parameters
+
+wrapped: 0
+ellipsized: 0
+lines: 2
+
+--- attributes
+
+range 0 2147483647
+
+--- directions
+
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+
+--- cursor positions
+
+0(0) 1(0) 5(0) 6(0) 13(0) 14(0) 21(0) 22(0) 30(0) 31(0) 34(0) 35(0) 42(0) 43(0) 44(0) 45(0) 46(0) 47(0) 51(0) 55(0) 59(0) 63(0) 67(0) 71(0) 72(0) 72(1) 75(0)
+
+--- lines
+
+i=1, index=0, paragraph-start=1, dir=ltr ' a⃠ 😊︎ 😊️ 🇩🇪 ✊ ✋🏾 0 # 🏴󠁵󠁳󠁣󠁡󠁿 ©
+'
+i=2, index=75, paragraph-start=1, dir=ltr ''
+
+--- runs
+
+i=1, index=0, chars=2, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, ' a'
+i=2, index=2, chars=1, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, '⃠'
+i=3, index=5, chars=1, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, ' '
+i=4, index=6, chars=2, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, '😊︎'
+i=5, index=13, chars=1, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, ' '
+i=6, index=14, chars=2, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, '😊️'
+i=7, index=21, chars=1, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, ' '
+i=8, index=22, chars=2, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, '🇩🇪'
+i=9, index=30, chars=1, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, ' '
+i=10, index=31, chars=1, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, '✊'
+i=11, index=34, chars=1, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, ' '
+i=12, index=35, chars=2, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, '✋🏾'
+i=13, index=42, chars=5, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, ' 0 # '
+i=14, index=47, chars=6, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, '🏴󠁵󠁳󠁣󠁡󠁿'
+i=15, index=71, chars=1, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, ' '
+i=16, index=72, chars=1, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, '©'
+i=17, index=74, no run, line end
+i=18, index=75, no run, line end
diff --git a/tests/layouts/valid-19.markup b/tests/layouts/valid-19.markup
new file mode 100644
index 00000000..e48c9f0e
--- /dev/null
+++ b/tests/layouts/valid-19.markup
@@ -0,0 +1,2 @@
+# various Emoji segmentation cases
+ a⃠ 😊︎ 😊️ 🇩🇪 ✊ ✋🏾 0 # 🏴󠁵󠁳󠁣󠁡󠁿 ©