gtk-builder-tool: Add some tests

This commit is contained in:
Matthias Clasen
2015-05-02 17:21:31 -04:00
parent 4f115ad940
commit d22f351e28
20 changed files with 177 additions and 1 deletions

View File

@ -0,0 +1,5 @@
<!-- default property gets stripped -->
<interface>
<object class="GtkWindow">
</object>
</interface>

View File

@ -0,0 +1,6 @@
<!-- default property gets stripped -->
<interface>
<object class="GtkWindow">
<property name="visible">False</property>
</object>
</interface>

View File

@ -0,0 +1,6 @@
<!-- non-default property not stripped -->
<interface>
<object class="GtkWindow">
<property name="visible">True</property>
</object>
</interface>

View File

@ -0,0 +1,6 @@
<!-- non-default property not stripped -->
<interface>
<object class="GtkWindow">
<property name="visible">True</property>
</object>
</interface>

View File

@ -0,0 +1,6 @@
<!-- translatable property not stripped -->
<interface>
<object class="GtkWindow">
<property name="visible" translatable="yes">False</property>
</object>
</interface>

View File

@ -0,0 +1,6 @@
<!-- translatable property not stripped -->
<interface>
<object class="GtkWindow">
<property name="visible" translatable="yes">False</property>
</object>
</interface>

View File

@ -0,0 +1,6 @@
<!-- irrelevant comments and context are stripped -->
<interface>
<object class="GtkWindow">
<property name="visible">True</property>
</object>
</interface>

View File

@ -0,0 +1,6 @@
<!-- irrelevant comments and context are stripped -->
<interface>
<object class="GtkWindow">
<property name="visible" comments="foo" context="bla">True</property>
</object>
</interface>

View File

@ -0,0 +1,9 @@
<!-- placeholders are stripped -->
<interface>
<object class="GtkWindow">
<child>
<object class="GtkBox">
</object>
</child>
</object>
</interface>

View File

@ -0,0 +1,12 @@
<!-- placeholders are stripped -->
<interface>
<object class="GtkWindow">
<child>
<object class="GtkBox">
<child>
<placeholder/>
</child>
</object>
</child>
</object>
</interface>

View File

@ -0,0 +1,5 @@
<!-- non-canonical property name works -->
<interface>
<object class="GtkWindow">
</object>
</interface>

View File

@ -0,0 +1,6 @@
<!-- non-canonical property name works -->
<interface>
<object class="GtkWindow">
<property name="default_width">-1</property>
</object>
</interface>

View File

@ -0,0 +1,8 @@
<!-- default child property gets stripped -->
<interface>
<object class="GtkBox">
<child>
<object class="GtkLabel"/>
</child>
</object>
</interface>

View File

@ -0,0 +1,12 @@
<!-- default child property gets stripped -->
<interface>
<object class="GtkBox">
<child>
<object class="GtkLabel">
</object>
<packing>
<property name="expand">False</property>
</packing>
</child>
</object>
</interface>

View File

@ -0,0 +1,11 @@
<!-- non-default child property remains -->
<interface>
<object class="GtkBox">
<child>
<object class="GtkLabel"/>
<packing>
<property name="expand">True</property>
</packing>
</child>
</object>
</interface>

View File

@ -0,0 +1,12 @@
<!-- non-default child property remains -->
<interface>
<object class="GtkBox">
<child>
<object class="GtkLabel">
</object>
<packing>
<property name="expand">True</property>
</packing>
</child>
</object>
</interface>