gtk-builder-tool: Add some tests
This commit is contained in:
5
testsuite/tools/simplify/test1.expected
Normal file
5
testsuite/tools/simplify/test1.expected
Normal file
@ -0,0 +1,5 @@
|
||||
<!-- default property gets stripped -->
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
</object>
|
||||
</interface>
|
6
testsuite/tools/simplify/test1.ui
Normal file
6
testsuite/tools/simplify/test1.ui
Normal file
@ -0,0 +1,6 @@
|
||||
<!-- default property gets stripped -->
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
<property name="visible">False</property>
|
||||
</object>
|
||||
</interface>
|
6
testsuite/tools/simplify/test2.expected
Normal file
6
testsuite/tools/simplify/test2.expected
Normal file
@ -0,0 +1,6 @@
|
||||
<!-- non-default property not stripped -->
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</interface>
|
6
testsuite/tools/simplify/test2.ui
Normal file
6
testsuite/tools/simplify/test2.ui
Normal file
@ -0,0 +1,6 @@
|
||||
<!-- non-default property not stripped -->
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</interface>
|
6
testsuite/tools/simplify/test3.expected
Normal file
6
testsuite/tools/simplify/test3.expected
Normal file
@ -0,0 +1,6 @@
|
||||
<!-- translatable property not stripped -->
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
<property name="visible" translatable="yes">False</property>
|
||||
</object>
|
||||
</interface>
|
6
testsuite/tools/simplify/test3.ui
Normal file
6
testsuite/tools/simplify/test3.ui
Normal file
@ -0,0 +1,6 @@
|
||||
<!-- translatable property not stripped -->
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
<property name="visible" translatable="yes">False</property>
|
||||
</object>
|
||||
</interface>
|
6
testsuite/tools/simplify/test4.expected
Normal file
6
testsuite/tools/simplify/test4.expected
Normal file
@ -0,0 +1,6 @@
|
||||
<!-- irrelevant comments and context are stripped -->
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</interface>
|
6
testsuite/tools/simplify/test4.ui
Normal file
6
testsuite/tools/simplify/test4.ui
Normal 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>
|
9
testsuite/tools/simplify/test5.expected
Normal file
9
testsuite/tools/simplify/test5.expected
Normal file
@ -0,0 +1,9 @@
|
||||
<!-- placeholders are stripped -->
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
12
testsuite/tools/simplify/test5.ui
Normal file
12
testsuite/tools/simplify/test5.ui
Normal file
@ -0,0 +1,12 @@
|
||||
<!-- placeholders are stripped -->
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
5
testsuite/tools/simplify/test6.expected
Normal file
5
testsuite/tools/simplify/test6.expected
Normal file
@ -0,0 +1,5 @@
|
||||
<!-- non-canonical property name works -->
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
</object>
|
||||
</interface>
|
6
testsuite/tools/simplify/test6.ui
Normal file
6
testsuite/tools/simplify/test6.ui
Normal file
@ -0,0 +1,6 @@
|
||||
<!-- non-canonical property name works -->
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
<property name="default_width">-1</property>
|
||||
</object>
|
||||
</interface>
|
8
testsuite/tools/simplify/test7.expected
Normal file
8
testsuite/tools/simplify/test7.expected
Normal file
@ -0,0 +1,8 @@
|
||||
<!-- default child property gets stripped -->
|
||||
<interface>
|
||||
<object class="GtkBox">
|
||||
<child>
|
||||
<object class="GtkLabel"/>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
12
testsuite/tools/simplify/test7.ui
Normal file
12
testsuite/tools/simplify/test7.ui
Normal 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>
|
11
testsuite/tools/simplify/test8.expected
Normal file
11
testsuite/tools/simplify/test8.expected
Normal 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>
|
12
testsuite/tools/simplify/test8.ui
Normal file
12
testsuite/tools/simplify/test8.ui
Normal 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>
|
Reference in New Issue
Block a user