summaryrefslogtreecommitdiffstats
path: root/test cases/vala/15 static vapi in source tree
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:41:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:41:38 +0000
commit7b6e527f440cd7e6f8be2b07cee320ee6ca18786 (patch)
tree4a2738d69fa2814659fdadddf5826282e73d81f4 /test cases/vala/15 static vapi in source tree
parentInitial commit. (diff)
downloadmeson-7b6e527f440cd7e6f8be2b07cee320ee6ca18786.tar.xz
meson-7b6e527f440cd7e6f8be2b07cee320ee6ca18786.zip
Adding upstream version 1.0.1.upstream/1.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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;
+}