Commit cff5e0d1 authored by Matthias Clasen's avatar Matthias Clasen

Add tests for the GtkFileFilter builder parser

parent 831c90ff
......@@ -204,6 +204,16 @@ test_ui = \
ui/dialog4.ui ui/dialog4.expected \
ui/dialog5.ui ui/dialog5.expected \
ui/dialog6.ui ui/dialog6.expected \
ui/filefilter1.ui ui/filefilter1.expected \
ui/filefilter2.ui ui/filefilter2.expected \
ui/filefilter3.ui ui/filefilter3.expected \
ui/filefilter4.ui ui/filefilter4.expected \
ui/filefilter5.ui ui/filefilter5.expected \
ui/filefilter6.ui ui/filefilter6.expected \
ui/filefilter7.ui ui/filefilter7.expected \
ui/filefilter8.ui ui/filefilter8.expected \
ui/filefilter9.ui ui/filefilter9.expected \
ui/filefilter10.ui ui/filefilter10.expected \
$(NULL)
EXTRA_DIST += \
......
<!-- test all valid file filter markup -->
<interface>
<object class="GtkFileFilter">
<mime-types>
<mime-type>text/plain</mime-type>
<mime-type>image/*</mime-type>
</mime-types>
<patterns>
<pattern>*.txt</pattern>
<pattern>*.png</pattern>
</patterns>
</object>
</interface>
ERROR: gtk-builder-error-quark 1
Unhandled tag: <warbl>
<!-- test invalid file filter markup element -->
<interface>
<object class="GtkFileFilter">
<warbl/>
</object>
</interface>
ERROR: g-markup-error-quark 4
.:5:1 attribute 'food' invalid for element 'mime-types'
<!-- test invalid file filter markup attribute -->
<interface>
<object class="GtkFileFilter">
<mime-types food="good">
</mime-types>
</object>
</interface>
ERROR: g-markup-error-quark 4
.:5:1 attribute 'food' invalid for element 'patterns'
<!-- test invalid file filter markup attribute -->
<interface>
<object class="GtkFileFilter">
<patterns food="good">
</patterns>
</object>
</interface>
ERROR: g-markup-error-quark 4
.:5:31 attribute 'food' invalid for element 'mime-type'
<!-- test invalid file filter markup attribute -->
<interface>
<object class="GtkFileFilter">
<mime-types>
<mime-type food="good">text/plain</mime-type>
</mime-types>
</object>
</interface>
ERROR: g-markup-error-quark 4
.:5:29 attribute 'food' invalid for element 'pattern'
<!-- test invalid file filter markup attribute -->
<interface>
<object class="GtkFileFilter">
<patterns>
<pattern food="good">*.txt</pattern>
</patterns>
</object>
</interface>
ERROR: gtk-builder-error-quark 1
.:5:15 Unsupported tag for GtkFileFilter: <warbl>
<!-- test invalid file filter markup element -->
<interface>
<object class="GtkFileFilter">
<mime-types>
<warbl/>
</mime-types>
</object>
</interface>
ERROR: gtk-builder-error-quark 1
.:5:15 Unsupported tag for GtkFileFilter: <warbl>
<!-- test invalid file filter markup element -->
<interface>
<object class="GtkFileFilter">
<patterns>
<warbl/>
</patterns>
</object>
</interface>
ERROR: gtk-builder-error-quark 1
.:5:26 Unsupported tag for GtkFileFilter: <warbl>
<!-- test invalid file filter markup element -->
<interface>
<object class="GtkFileFilter">
<mime-types>
<mime-type><warbl/></mime-type>
</mime-types>
</object>
</interface>
ERROR: gtk-builder-error-quark 1
.:5:24 Unsupported tag for GtkFileFilter: <warbl>
<!-- test invalid file filter markup element -->
<interface>
<object class="GtkFileFilter">
<patterns>
<pattern><warbl/></pattern>
</patterns>
</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