diff options
Diffstat (limited to 'test cases')
4 files changed, 53 insertions, 0 deletions
diff --git a/test cases/vala/28 generated ui file/TestBox.ui.in b/test cases/vala/28 generated ui file/TestBox.ui.in new file mode 100644 index 0000000..bf5c831 --- /dev/null +++ b/test cases/vala/28 generated ui file/TestBox.ui.in @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <requires lib="gtk" version="3.0"/> + <template class="TestBox" parent="GtkBox"> + </template> +</interface> diff --git a/test cases/vala/28 generated ui file/meson.build b/test cases/vala/28 generated ui file/meson.build new file mode 100644 index 0000000..fbf9840 --- /dev/null +++ b/test cases/vala/28 generated ui file/meson.build @@ -0,0 +1,34 @@ +project('demo', 'c', 'vala') + +gnome = import('gnome', required: false) + +if not gnome.found() + error('MESON_SKIP_TEST: gnome module not supported') +endif + +deps = [ + dependency('glib-2.0', version : '>=2.50'), + dependency('gobject-2.0'), + dependency('gtk+-3.0'), +] + +ui_tgt = custom_target( + input: 'TestBox.ui.in', + output: 'TestBox.ui', + command: [find_program('cat')], + feed: true, + capture: true, +) + +resources = gnome.compile_resources('test-resources', + 'test.gresource.xml', + c_name: 'test_res', + dependencies: ui_tgt, +) + +executable( + 'demo', + 'test.vala', + resources, + dependencies: deps, +) diff --git a/test cases/vala/28 generated ui file/test.gresource.xml b/test cases/vala/28 generated ui file/test.gresource.xml new file mode 100644 index 0000000..382b951 --- /dev/null +++ b/test cases/vala/28 generated ui file/test.gresource.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<gresources> + <gresource prefix="/com/mesonbuild/test"> + <file>TestBox.ui</file> + </gresource> +</gresources> diff --git a/test cases/vala/28 generated ui file/test.vala b/test cases/vala/28 generated ui file/test.vala new file mode 100644 index 0000000..36f565b --- /dev/null +++ b/test cases/vala/28 generated ui file/test.vala @@ -0,0 +1,7 @@ +[GtkTemplate (ui = "/com/mesonbuild/test/TestBox.ui")] +class TestBox: Gtk.Box { +} + +int main() { + return 0; +} |