Add tests for GtkContainer builder parser
This commit is contained in:
parent
aeddf55655
commit
66ce0b6509
1
testsuite/gtk/ui/container1.expected
Normal file
1
testsuite/gtk/ui/container1.expected
Normal file
@ -0,0 +1 @@
|
||||
SUCCESS
|
14
testsuite/gtk/ui/container1.ui
Normal file
14
testsuite/gtk/ui/container1.ui
Normal file
@ -0,0 +1,14 @@
|
||||
<!-- test all valid container attributes -->
|
||||
<interface>
|
||||
<object class="GtkBox">
|
||||
<child>
|
||||
<object class="GtkLabel" id="widget1"/>
|
||||
<packing>
|
||||
<property name="expand" translatable="yes" comments="foo" context="bar">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<focus-chain>
|
||||
<widget name="widget1"/>
|
||||
</focus-chain>
|
||||
</object>
|
||||
</interface>
|
2
testsuite/gtk/ui/container2.expected
Normal file
2
testsuite/gtk/ui/container2.expected
Normal file
@ -0,0 +1,2 @@
|
||||
ERROR: g-markup-error-quark 6
|
||||
.:7:32 element 'property' requires attribute 'name'
|
11
testsuite/gtk/ui/container2.ui
Normal file
11
testsuite/gtk/ui/container2.ui
Normal file
@ -0,0 +1,11 @@
|
||||
<!-- invalid child property attribute -->
|
||||
<interface>
|
||||
<object class="GtkBox">
|
||||
<child>
|
||||
<object class="GtkLabel" id="widget1"/>
|
||||
<packing>
|
||||
<property food="good"/>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
2
testsuite/gtk/ui/container3.expected
Normal file
2
testsuite/gtk/ui/container3.expected
Normal file
@ -0,0 +1,2 @@
|
||||
ERROR: gtk-builder-error-quark 1
|
||||
.:7:17 Unsupported tag for GtkContainer: <warbl>
|
11
testsuite/gtk/ui/container3.ui
Normal file
11
testsuite/gtk/ui/container3.ui
Normal file
@ -0,0 +1,11 @@
|
||||
<!-- invalid packing element -->
|
||||
<interface>
|
||||
<object class="GtkBox">
|
||||
<child>
|
||||
<object class="GtkLabel" id="widget1"/>
|
||||
<packing>
|
||||
<warbl/>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
2
testsuite/gtk/ui/container4.expected
Normal file
2
testsuite/gtk/ui/container4.expected
Normal file
@ -0,0 +1,2 @@
|
||||
ERROR: g-markup-error-quark 6
|
||||
.:5:16 element 'widget' requires attribute 'name'
|
8
testsuite/gtk/ui/container4.ui
Normal file
8
testsuite/gtk/ui/container4.ui
Normal file
@ -0,0 +1,8 @@
|
||||
<!-- missing focus chain widget name attribute -->
|
||||
<interface>
|
||||
<object class="GtkBox">
|
||||
<focus-chain>
|
||||
<widget/>
|
||||
</focus-chain>
|
||||
</object>
|
||||
</interface>
|
2
testsuite/gtk/ui/container5.expected
Normal file
2
testsuite/gtk/ui/container5.expected
Normal file
@ -0,0 +1,2 @@
|
||||
ERROR: g-markup-error-quark 6
|
||||
.:5:28 element 'widget' requires attribute 'name'
|
8
testsuite/gtk/ui/container5.ui
Normal file
8
testsuite/gtk/ui/container5.ui
Normal file
@ -0,0 +1,8 @@
|
||||
<!-- wrong focus chain widget name attribute -->
|
||||
<interface>
|
||||
<object class="GtkBox">
|
||||
<focus-chain>
|
||||
<widget food="good"/>
|
||||
</focus-chain>
|
||||
</object>
|
||||
</interface>
|
2
testsuite/gtk/ui/container6.expected
Normal file
2
testsuite/gtk/ui/container6.expected
Normal file
@ -0,0 +1,2 @@
|
||||
ERROR: gtk-builder-error-quark 1
|
||||
.:5:15 Unsupported tag for GtkContainer: <warbl>
|
8
testsuite/gtk/ui/container6.ui
Normal file
8
testsuite/gtk/ui/container6.ui
Normal file
@ -0,0 +1,8 @@
|
||||
<!-- wrong focus chain element -->
|
||||
<interface>
|
||||
<object class="GtkBox">
|
||||
<focus-chain>
|
||||
<warbl/>
|
||||
</focus-chain>
|
||||
</object>
|
||||
</interface>
|
2
testsuite/gtk/ui/container7.expected
Normal file
2
testsuite/gtk/ui/container7.expected
Normal file
@ -0,0 +1,2 @@
|
||||
ERROR: g-markup-error-quark 4
|
||||
.:7:1 attribute 'try' invalid for element 'packing'
|
10
testsuite/gtk/ui/container7.ui
Normal file
10
testsuite/gtk/ui/container7.ui
Normal file
@ -0,0 +1,10 @@
|
||||
<!-- invalid container packing attribute -->
|
||||
<interface>
|
||||
<object class="GtkBox">
|
||||
<child>
|
||||
<object class="GtkLabel" id="widget1"/>
|
||||
<packing try="this">
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
Loading…
Reference in New Issue
Block a user