mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 19:00:08 +00:00
Add tests for the GtkDialog builder parser
This commit is contained in:
parent
4ee291c8f1
commit
95ea81d6d1
@ -198,6 +198,12 @@ test_ui = \
|
||||
ui/levelbar4.ui ui/levelbar4.expected \
|
||||
ui/levelbar5.ui ui/levelbar5.expected \
|
||||
ui/levelbar6.ui ui/levelbar6.expected \
|
||||
ui/dialog1.ui ui/dialog1.expected \
|
||||
ui/dialog2.ui ui/dialog2.expected \
|
||||
ui/dialog3.ui ui/dialog3.expected \
|
||||
ui/dialog4.ui ui/dialog4.expected \
|
||||
ui/dialog5.ui ui/dialog5.expected \
|
||||
ui/dialog6.ui ui/dialog6.expected \
|
||||
$(NULL)
|
||||
|
||||
EXTRA_DIST += \
|
||||
|
1
testsuite/gtk/ui/dialog1.expected
Normal file
1
testsuite/gtk/ui/dialog1.expected
Normal file
@ -0,0 +1 @@
|
||||
SUCCESS
|
17
testsuite/gtk/ui/dialog1.ui
Normal file
17
testsuite/gtk/ui/dialog1.ui
Normal file
@ -0,0 +1,17 @@
|
||||
<!-- test all valid dialog markup -->
|
||||
<interface>
|
||||
<object class="GtkDialog">
|
||||
<child type="action">
|
||||
<object class="GtkButton" id="button_cancel"/>
|
||||
</child>
|
||||
<child type="action">
|
||||
<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" default="true">button_ok</action-widget>
|
||||
</action-widgets>
|
||||
</object>
|
||||
</interface>
|
2
testsuite/gtk/ui/dialog2.expected
Normal file
2
testsuite/gtk/ui/dialog2.expected
Normal file
@ -0,0 +1,2 @@
|
||||
ERROR: g-markup-error-quark 6
|
||||
.:10:23 element 'action-widget' requires attribute 'response'
|
13
testsuite/gtk/ui/dialog2.ui
Normal file
13
testsuite/gtk/ui/dialog2.ui
Normal file
@ -0,0 +1,13 @@
|
||||
<!-- missing attribute in dialog markup -->
|
||||
<interface>
|
||||
<object class="GtkDialog">
|
||||
<child type="action">
|
||||
<object class="GtkButton" id="button_ok">
|
||||
<property name="can-default">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<action-widgets>
|
||||
<action-widget>button_ok</action-widget>
|
||||
</action-widgets>
|
||||
</object>
|
||||
</interface>
|
2
testsuite/gtk/ui/dialog3.expected
Normal file
2
testsuite/gtk/ui/dialog3.expected
Normal file
@ -0,0 +1,2 @@
|
||||
ERROR: gtk-builder-error-quark 6
|
||||
.:10:40 Could not parse enum: `warbl'
|
13
testsuite/gtk/ui/dialog3.ui
Normal file
13
testsuite/gtk/ui/dialog3.ui
Normal file
@ -0,0 +1,13 @@
|
||||
<!-- invalid dialog markup attribute -->
|
||||
<interface>
|
||||
<object class="GtkDialog">
|
||||
<child type="action">
|
||||
<object class="GtkButton" id="button_ok">
|
||||
<property name="can-default">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<action-widgets>
|
||||
<action-widget response="warbl">button_ok</action-widget>
|
||||
</action-widgets>
|
||||
</object>
|
||||
</interface>
|
2
testsuite/gtk/ui/dialog4.expected
Normal file
2
testsuite/gtk/ui/dialog4.expected
Normal file
@ -0,0 +1,2 @@
|
||||
ERROR: gtk-builder-error-quark 1
|
||||
.:10:15 Unsupported tag for GtkDialog: <warbl>
|
13
testsuite/gtk/ui/dialog4.ui
Normal file
13
testsuite/gtk/ui/dialog4.ui
Normal file
@ -0,0 +1,13 @@
|
||||
<!-- invalid dialog markup element -->
|
||||
<interface>
|
||||
<object class="GtkDialog">
|
||||
<child type="action">
|
||||
<object class="GtkButton" id="button_ok">
|
||||
<property name="can-default">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<action-widgets>
|
||||
<warbl/>
|
||||
</action-widgets>
|
||||
</object>
|
||||
</interface>
|
2
testsuite/gtk/ui/dialog5.expected
Normal file
2
testsuite/gtk/ui/dialog5.expected
Normal file
@ -0,0 +1,2 @@
|
||||
ERROR: gtk-builder-error-quark 1
|
||||
Unhandled tag: <warbl>
|
13
testsuite/gtk/ui/dialog5.ui
Normal file
13
testsuite/gtk/ui/dialog5.ui
Normal file
@ -0,0 +1,13 @@
|
||||
<!-- invalid dialog markup element -->
|
||||
<interface>
|
||||
<object class="GtkDialog">
|
||||
<child type="action">
|
||||
<object class="GtkButton" id="button_ok">
|
||||
<property name="can-default">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<action-widgets>
|
||||
</action-widgets>
|
||||
<warbl/>
|
||||
</object>
|
||||
</interface>
|
Loading…
Reference in New Issue
Block a user