mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 19:00:08 +00:00
Add tests for the infobar builder parser
This commit is contained in:
parent
2dc8673a41
commit
8ae4a82ae4
@ -214,6 +214,11 @@ test_ui = \
|
||||
ui/filefilter8.ui ui/filefilter8.expected \
|
||||
ui/filefilter9.ui ui/filefilter9.expected \
|
||||
ui/filefilter10.ui ui/filefilter10.expected \
|
||||
ui/infobar1.ui ui/infobar1.expected \
|
||||
ui/infobar2.ui ui/infobar2.expected \
|
||||
ui/infobar3.ui ui/infobar3.expected \
|
||||
ui/infobar4.ui ui/infobar4.expected \
|
||||
ui/infobar5.ui ui/infobar5.expected \
|
||||
$(NULL)
|
||||
|
||||
EXTRA_DIST += \
|
||||
|
1
testsuite/gtk/ui/infobar1.expected
Normal file
1
testsuite/gtk/ui/infobar1.expected
Normal file
@ -0,0 +1 @@
|
||||
SUCCESS
|
17
testsuite/gtk/ui/infobar1.ui
Normal file
17
testsuite/gtk/ui/infobar1.ui
Normal file
@ -0,0 +1,17 @@
|
||||
<!-- test all valid infobar markup -->
|
||||
<interface>
|
||||
<object class="GtkInfoBar">
|
||||
<child>
|
||||
<object class="GtkButton" id="button_cancel"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button_ok">
|
||||
<property name="can-default">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<action-widgets>
|
||||
<action-widget response="-3">button_cancel</action-widget>
|
||||
<action-widget response="ok">button_ok</action-widget>
|
||||
</action-widgets>
|
||||
</object>
|
||||
</interface>
|
2
testsuite/gtk/ui/infobar2.expected
Normal file
2
testsuite/gtk/ui/infobar2.expected
Normal file
@ -0,0 +1,2 @@
|
||||
ERROR: gtk-builder-error-quark 6
|
||||
.:8:38 Could not parse enum: `xyz'
|
11
testsuite/gtk/ui/infobar2.ui
Normal file
11
testsuite/gtk/ui/infobar2.ui
Normal file
@ -0,0 +1,11 @@
|
||||
<!-- invalid response value -->
|
||||
<interface>
|
||||
<object class="GtkInfoBar">
|
||||
<child>
|
||||
<object class="GtkButton" id="button_cancel"/>
|
||||
</child>
|
||||
<action-widgets>
|
||||
<action-widget response="xyz">button_cancel</action-widget>
|
||||
</action-widgets>
|
||||
</object>
|
||||
</interface>
|
2
testsuite/gtk/ui/infobar3.expected
Normal file
2
testsuite/gtk/ui/infobar3.expected
Normal file
@ -0,0 +1,2 @@
|
||||
ERROR: g-markup-error-quark 4
|
||||
.:8:48 attribute 'food' invalid for element 'action-widget'
|
11
testsuite/gtk/ui/infobar3.ui
Normal file
11
testsuite/gtk/ui/infobar3.ui
Normal file
@ -0,0 +1,11 @@
|
||||
<!-- invalid attribute -->
|
||||
<interface>
|
||||
<object class="GtkInfoBar">
|
||||
<child>
|
||||
<object class="GtkButton" id="button_cancel"/>
|
||||
</child>
|
||||
<action-widgets>
|
||||
<action-widget response="ok" food="egg">button_cancel</action-widget>
|
||||
</action-widgets>
|
||||
</object>
|
||||
</interface>
|
2
testsuite/gtk/ui/infobar4.expected
Normal file
2
testsuite/gtk/ui/infobar4.expected
Normal file
@ -0,0 +1,2 @@
|
||||
ERROR: gtk-builder-error-quark 1
|
||||
.:8:15 Unsupported tag for GtkInfoBar: <worbl>
|
11
testsuite/gtk/ui/infobar4.ui
Normal file
11
testsuite/gtk/ui/infobar4.ui
Normal file
@ -0,0 +1,11 @@
|
||||
<!-- invalid element -->
|
||||
<interface>
|
||||
<object class="GtkInfoBar">
|
||||
<child>
|
||||
<object class="GtkButton" id="button_cancel"/>
|
||||
</child>
|
||||
<action-widgets>
|
||||
<worbl/>
|
||||
</action-widgets>
|
||||
</object>
|
||||
</interface>
|
2
testsuite/gtk/ui/infobar5.expected
Normal file
2
testsuite/gtk/ui/infobar5.expected
Normal file
@ -0,0 +1,2 @@
|
||||
ERROR: gtk-builder-error-quark 1
|
||||
Unhandled tag: <worbl>
|
11
testsuite/gtk/ui/infobar5.ui
Normal file
11
testsuite/gtk/ui/infobar5.ui
Normal file
@ -0,0 +1,11 @@
|
||||
<!-- invalid element -->
|
||||
<interface>
|
||||
<object class="GtkInfoBar">
|
||||
<child>
|
||||
<object class="GtkButton" id="button_cancel"/>
|
||||
</child>
|
||||
<action-widgets>
|
||||
</action-widgets>
|
||||
<worbl/>
|
||||
</object>
|
||||
</interface>
|
Loading…
Reference in New Issue
Block a user