summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-08-02 01:17:18 -0400
committerMatthias Clasen <mclasen@redhat.com>2021-08-02 01:24:01 -0400
commit91687742f61d4b74572f3176fa3d8442438df504 (patch)
tree17b032d705eeeb5ae527d91d0eda4d2bdf523356 /tests
parentc0697a15fb7c738ab0ff78dc4abedff896497749 (diff)
downloadpango-91687742f61d4b74572f3176fa3d8442438df504.tar.gz
itemize: Fix up gravity state initializationgravity-fix
itemize_state_init was setting gravity-related fields to their initial values too late, after update_attr_iterator has already set them to the values for the first run. Test included.
Diffstat (limited to 'tests')
-rw-r--r--tests/layouts/valid-20.expected40
-rw-r--r--tests/layouts/valid-20.markup2
2 files changed, 42 insertions, 0 deletions
diff --git a/tests/layouts/valid-20.expected b/tests/layouts/valid-20.expected
new file mode 100644
index 00000000..6939260b
--- /dev/null
+++ b/tests/layouts/valid-20.expected
@@ -0,0 +1,40 @@
+abcdef
+
+--- parameters
+
+wrapped: 0
+ellipsized: 0
+lines: 2
+
+--- attributes
+
+range 0 3
+[0,3]gravity=1
+[0,3]gravity-hint=1
+range 3 6
+[3,6]gravity=0
+range 6 2147483647
+
+--- directions
+
+0 0 0 0 0 0 0
+
+--- cursor positions
+
+0(0) 1(0) 2(0) 3(0) 4(0) 5(0) 5(1) 7(0)
+
+--- lines
+
+i=1, index=0, paragraph-start=1, dir=ltr 'abcdef
+'
+i=2, index=7, paragraph-start=1, dir=ltr ''
+
+--- runs
+
+i=1, index=0, chars=3, level=0, gravity=east, flags=0, font=OMITTED, script=latin, language=en-us, 'abc'
+[0,3]gravity=1
+[0,3]gravity-hint=1
+i=2, index=3, chars=3, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'def'
+[3,6]gravity=0
+i=3, index=6, no run, line end
+i=4, index=7, no run, line end
diff --git a/tests/layouts/valid-20.markup b/tests/layouts/valid-20.markup
new file mode 100644
index 00000000..fe6480d7
--- /dev/null
+++ b/tests/layouts/valid-20.markup
@@ -0,0 +1,2 @@
+# exercise gravity handling
+<span gravity='east' gravity_hint='strong'>abc</span><span gravity='south'>def</span>