Commit 95ea81d6 authored by Matthias Clasen's avatar Matthias Clasen

Add tests for the GtkDialog builder parser

parent 4ee291c8
...@@ -198,6 +198,12 @@ test_ui = \ ...@@ -198,6 +198,12 @@ test_ui = \
ui/levelbar4.ui ui/levelbar4.expected \ ui/levelbar4.ui ui/levelbar4.expected \
ui/levelbar5.ui ui/levelbar5.expected \ ui/levelbar5.ui ui/levelbar5.expected \
ui/levelbar6.ui ui/levelbar6.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) $(NULL)
EXTRA_DIST += \ EXTRA_DIST += \
......
<!-- 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>
ERROR: g-markup-error-quark 6
.:10:23 element 'action-widget' requires attribute 'response'
<!-- 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>
ERROR: gtk-builder-error-quark 6
.:10:40 Could not parse enum: `warbl'
<!-- 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>
ERROR: gtk-builder-error-quark 1
.:10:15 Unsupported tag for GtkDialog: <warbl>
<!-- 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>
ERROR: gtk-builder-error-quark 1
Unhandled tag: <warbl>
<!-- 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>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment