mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
Add string lists
This commit is contained in:
parent
aa447466c0
commit
2a18273c80
7 changed files with 124 additions and 2 deletions
9
tests/sample_errors/obj_in_string_list.blp
Normal file
9
tests/sample_errors/obj_in_string_list.blp
Normal file
|
@ -0,0 +1,9 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
StringList {
|
||||
strings [
|
||||
id,
|
||||
];
|
||||
}
|
||||
|
||||
Widget id {}
|
1
tests/sample_errors/obj_in_string_list.err
Normal file
1
tests/sample_errors/obj_in_string_list.err
Normal file
|
@ -0,0 +1 @@
|
|||
5,5,2,Cannot assign Gtk.Widget to string
|
8
tests/samples/string_list.blp
Normal file
8
tests/samples/string_list.blp
Normal file
|
@ -0,0 +1,8 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
StringList {
|
||||
strings [
|
||||
"Hello, world!",
|
||||
_("Hello!"),
|
||||
];
|
||||
}
|
10
tests/samples/string_list.ui
Normal file
10
tests/samples/string_list.ui
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="GtkStringList">
|
||||
<items>
|
||||
<item>Hello, world!</item>
|
||||
<item translatable="true">Hello!</item>
|
||||
</items>
|
||||
</object>
|
||||
</interface>
|
|
@ -105,6 +105,7 @@ class TestSamples(unittest.TestCase):
|
|||
self.assert_sample("property")
|
||||
self.assert_sample("signal")
|
||||
self.assert_sample("size_group")
|
||||
self.assert_sample("string_list")
|
||||
self.assert_sample("strings")
|
||||
self.assert_sample("style")
|
||||
self.assert_sample("template")
|
||||
|
@ -127,6 +128,7 @@ class TestSamples(unittest.TestCase):
|
|||
self.assert_sample_error("ns_not_imported")
|
||||
self.assert_sample_error("not_a_class")
|
||||
self.assert_sample_error("object_dne")
|
||||
self.assert_sample_error("obj_in_string_list")
|
||||
self.assert_sample_error("obj_prop_type")
|
||||
self.assert_sample_error("property_dne")
|
||||
self.assert_sample_error("signal_dne")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue