summaryrefslogtreecommitdiffstats
path: root/test cases/vala/8 generated sources/src
diff options
context:
space:
mode:
Diffstat (limited to 'test cases/vala/8 generated sources/src')
-rw-r--r--test cases/vala/8 generated sources/src/config.vala.in3
-rw-r--r--test cases/vala/8 generated sources/src/copy_file.py6
-rw-r--r--test cases/vala/8 generated sources/src/meson.build17
-rw-r--r--test cases/vala/8 generated sources/src/returncode.in3
-rw-r--r--test cases/vala/8 generated sources/src/test.vala4
-rw-r--r--test cases/vala/8 generated sources/src/write_wrapper.py12
6 files changed, 45 insertions, 0 deletions
diff --git a/test cases/vala/8 generated sources/src/config.vala.in b/test cases/vala/8 generated sources/src/config.vala.in
new file mode 100644
index 0000000..a5196fd
--- /dev/null
+++ b/test cases/vala/8 generated sources/src/config.vala.in
@@ -0,0 +1,3 @@
+namespace Config {
+ public static const string x = "@x@";
+}
diff --git a/test cases/vala/8 generated sources/src/copy_file.py b/test cases/vala/8 generated sources/src/copy_file.py
new file mode 100644
index 0000000..ff42ac3
--- /dev/null
+++ b/test cases/vala/8 generated sources/src/copy_file.py
@@ -0,0 +1,6 @@
+#!/usr/bin/env python3
+
+import sys
+import shutil
+
+shutil.copyfile(sys.argv[1], sys.argv[2])
diff --git a/test cases/vala/8 generated sources/src/meson.build b/test cases/vala/8 generated sources/src/meson.build
new file mode 100644
index 0000000..06515c1
--- /dev/null
+++ b/test cases/vala/8 generated sources/src/meson.build
@@ -0,0 +1,17 @@
+config = configure_file(input: 'config.vala.in',
+ output: 'config.vala',
+ configuration: cd)
+
+print = find_program('write_wrapper.py')
+wrapper = custom_target('wrapper',
+ output : 'print_wrapper.vala',
+ command : [print, '@OUTPUT@'])
+
+copy = find_program('copy_file.py')
+gen = generator(copy,
+ output : '@BASENAME@.vala',
+ arguments : ['@INPUT@', '@OUTPUT@'])
+
+returncode = gen.process('returncode.in')
+
+src = files('test.vala')
diff --git a/test cases/vala/8 generated sources/src/returncode.in b/test cases/vala/8 generated sources/src/returncode.in
new file mode 100644
index 0000000..e3d3ea6
--- /dev/null
+++ b/test cases/vala/8 generated sources/src/returncode.in
@@ -0,0 +1,3 @@
+int return_code() {
+ return 0;
+}
diff --git a/test cases/vala/8 generated sources/src/test.vala b/test cases/vala/8 generated sources/src/test.vala
new file mode 100644
index 0000000..ca27676
--- /dev/null
+++ b/test cases/vala/8 generated sources/src/test.vala
@@ -0,0 +1,4 @@
+int main() {
+ print_wrapper (Config.x);
+ return return_code ();
+}
diff --git a/test cases/vala/8 generated sources/src/write_wrapper.py b/test cases/vala/8 generated sources/src/write_wrapper.py
new file mode 100644
index 0000000..b5608f7
--- /dev/null
+++ b/test cases/vala/8 generated sources/src/write_wrapper.py
@@ -0,0 +1,12 @@
+#!/usr/bin/env python3
+
+import sys
+
+contents = '''
+void print_wrapper(string arg) {
+ print (arg);
+}
+'''
+
+with open(sys.argv[1], 'w') as f:
+ f.write(contents)