mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
Add more tests
This commit is contained in:
parent
08a74acb37
commit
a4b31f2cb0
24 changed files with 89 additions and 8 deletions
7
tests/samples/object_prop.blp
Normal file
7
tests/samples/object_prop.blp
Normal file
|
@ -0,0 +1,7 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
template TestTemplate : Label {
|
||||
test-property: Button {
|
||||
label: "Hello, world!";
|
||||
};
|
||||
}
|
11
tests/samples/object_prop.ui
Normal file
11
tests/samples/object_prop.ui
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<template class="TestTemplate" parent="GtkLabel">
|
||||
<property name="test-property">
|
||||
<object class="GtkButton">
|
||||
<property name="label">Hello, world!</property>
|
||||
</object>
|
||||
</property>
|
||||
</template>
|
||||
</interface>
|
|
@ -1,3 +1,6 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
template TestTemplate : ApplicationWindow {}
|
||||
template TestTemplate : ApplicationWindow {
|
||||
test-property: "Hello, world";
|
||||
test-signal => on_test_signal();
|
||||
}
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<template class="TestTemplate" parent="GtkApplicationWindow"></template>
|
||||
<template class="TestTemplate" parent="GtkApplicationWindow">
|
||||
<property name="test-property">Hello, world</property>
|
||||
<signal name="test-signal" handler="on_test_signal"/>
|
||||
</template>
|
||||
</interface>
|
||||
|
|
5
tests/samples/translated.blp
Normal file
5
tests/samples/translated.blp
Normal file
|
@ -0,0 +1,5 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
Label {
|
||||
label: _("Hello, world!");
|
||||
}
|
7
tests/samples/translated.ui
Normal file
7
tests/samples/translated.ui
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="true">Hello, world!</property>
|
||||
</object>
|
||||
</interface>
|
Loading…
Add table
Add a link
Reference in a new issue