summaryrefslogtreecommitdiffstats
path: root/test cases/vala/15 static vapi in source tree
diff options
context:
space:
mode:
Diffstat (limited to 'test cases/vala/15 static vapi in source tree')
-rw-r--r--test cases/vala/15 static vapi in source tree/meson.build13
-rw-r--r--test cases/vala/15 static vapi in source tree/test.vala6
-rw-r--r--test cases/vala/15 static vapi in source tree/vapi/config.vapi4
3 files changed, 23 insertions, 0 deletions
diff --git a/test cases/vala/15 static vapi in source tree/meson.build b/test cases/vala/15 static vapi in source tree/meson.build
new file mode 100644
index 0000000..44bea48
--- /dev/null
+++ b/test cases/vala/15 static vapi in source tree/meson.build
@@ -0,0 +1,13 @@
+project('static vapi', 'c', 'vala')
+
+glib = dependency('glib-2.0')
+
+conf = configuration_data()
+conf.set_quoted('VERSION', '1.0.0')
+config_h = configure_file(output : 'config.h',
+ configuration : conf)
+
+e = executable('static-vapi', 'vapi/config.vapi', 'test.vala',
+ dependencies : glib)
+
+test('test-config', e)
diff --git a/test cases/vala/15 static vapi in source tree/test.vala b/test cases/vala/15 static vapi in source tree/test.vala
new file mode 100644
index 0000000..06f2d59
--- /dev/null
+++ b/test cases/vala/15 static vapi in source tree/test.vala
@@ -0,0 +1,6 @@
+using GLib;
+using Config;
+
+public int main (string[] args) {
+ return GLib.strcmp(VERSION, "1.0.0");
+}
diff --git a/test cases/vala/15 static vapi in source tree/vapi/config.vapi b/test cases/vala/15 static vapi in source tree/vapi/config.vapi
new file mode 100644
index 0000000..71bcc6e
--- /dev/null
+++ b/test cases/vala/15 static vapi in source tree/vapi/config.vapi
@@ -0,0 +1,4 @@
+[CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "config.h")]
+namespace Config {
+ public const string VERSION;
+}