testsuite: Add a test for char wrapping
This commit is contained in:
@@ -566,6 +566,8 @@ testdata = [
|
||||
# it is not in xfail since it succeeds on some platforms
|
||||
#'window-show-contents-on-map.ref.ui',
|
||||
#'window-show-contents-on-map.ui',
|
||||
'wrap-char.ref.ui',
|
||||
'wrap-char.ui',
|
||||
'wrap-margin-align-critical.ref.ui',
|
||||
'wrap-margin-align-critical.ui',
|
||||
'wrapping-in-boxes-in-boxes.ref.ui',
|
||||
|
||||
20
testsuite/reftests/wrap-char.ref.ui
Normal file
20
testsuite/reftests/wrap-char.ref.ui
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
<!-- large enough for Hello World wrapped any which way -->
|
||||
<property name="width_request">200</property>
|
||||
<property name="height_request">100</property>
|
||||
<property name="decorated">0</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label">Hello
|
||||
World</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<attributes>
|
||||
<attribute name="font-desc" value="Monospace"></attribute>
|
||||
</attributes>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
23
testsuite/reftests/wrap-char.ui
Normal file
23
testsuite/reftests/wrap-char.ui
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
<!-- large enough for Hello World wrapped any which way -->
|
||||
<property name="width_request">200</property>
|
||||
<property name="height_request">100</property>
|
||||
<property name="decorated">0</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label">Hello World</property>
|
||||
<!-- "Hello" and "World" are 5 characters each, so it should break perfectly -->
|
||||
<property name="max-width-chars">5</property>
|
||||
<property name="wrap">1</property>
|
||||
<property name="wrap-mode">char</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<attributes>
|
||||
<attribute name="font-desc" value="Monospace"></attribute>
|
||||
</attributes>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
Reference in New Issue
Block a user