diff options
author | Benjamin Otte <otte@redhat.com> | 2021-10-19 01:07:22 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2021-10-19 01:10:59 +0200 |
commit | 00214cbb4a4bf64a9d2de8aa084c9192a6f0d658 (patch) | |
tree | ad6ec2c2303552da1722e2cfae61d9e5fa81cea7 | |
parent | ba44e7a228534ff066694ad97d25eaa23ec5f3af (diff) | |
download | gtk+-00214cbb4a4bf64a9d2de8aa084c9192a6f0d658.tar.gz |
testsuite: Add test specifically for recent fix
label-sizing.ui tests this, too - but that test tests lots of other
things, and if this ever happens again, we want to debug it in a small
test.
3 files changed, 42 insertions, 0 deletions
diff --git a/testsuite/reftests/label-max-width-chars-and-halign-and-infinite-width.ref.ui b/testsuite/reftests/label-max-width-chars-and-halign-and-infinite-width.ref.ui new file mode 100644 index 0000000000..68c5d0a112 --- /dev/null +++ b/testsuite/reftests/label-max-width-chars-and-halign-and-infinite-width.ref.ui @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <object class="GtkWindow" > + <property name="decorated">0</property> + <property name="width-request">200</property> + <child> + <object class="GtkLabel" > + <property name="halign">start</property> + <property name="valign">end</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">ABCDE +ABCD</property> + <property name="max_width_chars">4</property> + <attributes> + <attribute name="font-desc" value="Monospace"></attribute> + </attributes> + </object> + </child> + </object> +</interface> diff --git a/testsuite/reftests/label-max-width-chars-and-halign-and-infinite-width.ui b/testsuite/reftests/label-max-width-chars-and-halign-and-infinite-width.ui new file mode 100644 index 0000000000..10dd7d2d5a --- /dev/null +++ b/testsuite/reftests/label-max-width-chars-and-halign-and-infinite-width.ui @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <object class="GtkWindow" > + <property name="decorated">0</property> + <property name="width-request">200</property> + <child> + <object class="GtkLabel" > + <property name="halign">start</property> + <property name="valign">end</property> + <property name="label" translatable="yes">ABCDE ABCD</property> + <property name="xalign">0.0</property> + <property name="wrap">1</property> + <property name="max-width-chars">4</property> + <attributes> + <attribute name="font-desc" value="Monospace"></attribute> + </attributes> + </object> + </child> + </object> +</interface> diff --git a/testsuite/reftests/meson.build b/testsuite/reftests/meson.build index d4322f5c63..6cad66c535 100644 --- a/testsuite/reftests/meson.build +++ b/testsuite/reftests/meson.build @@ -314,6 +314,8 @@ testdata = [ 'label-fonts.css', 'label-fonts.ref.ui', 'label-fonts.ui', + 'label-max-width-chars-and-halign-and-infinite-width.ui', + 'label-max-width-chars-and-halign-and-infinite-width.ref.ui', 'label-shadows.css', 'label-shadows.ref.ui', 'label-shadows.ui', |