aboutsummaryrefslogtreecommitdiff
path: root/test cases/python
diff options
context:
space:
mode:
Diffstat (limited to 'test cases/python')
-rwxr-xr-xtest cases/python/11 script path/gen7
-rw-r--r--test cases/python/11 script path/meson.build19
-rwxr-xr-xtest cases/python/11 script path/run.py7
3 files changed, 33 insertions, 0 deletions
diff --git a/test cases/python/11 script path/gen b/test cases/python/11 script path/gen
new file mode 100755
index 0000000..3d31694
--- /dev/null
+++ b/test cases/python/11 script path/gen
@@ -0,0 +1,7 @@
+#!/usr/bin/env python3
+
+
+if __name__ == '__main__':
+ with open('x.c', 'w', encoding='utf-8') as f:
+ f.write('int main() { return 0; }\n')
+ exit(0)
diff --git a/test cases/python/11 script path/meson.build b/test cases/python/11 script path/meson.build
new file mode 100644
index 0000000..c913ca4
--- /dev/null
+++ b/test cases/python/11 script path/meson.build
@@ -0,0 +1,19 @@
+project('11 script path', 'c')
+
+if meson.backend() != 'ninja'
+ error('MESON_SKIP_TEST: Ninja backend required')
+endif
+
+run = find_program('run.py')
+
+gen = find_program('gen')
+
+src = custom_target(
+ 'src',
+ command: [run, gen],
+ output: 'x.c',
+)
+
+exe = executable('e',
+ src,
+)
diff --git a/test cases/python/11 script path/run.py b/test cases/python/11 script path/run.py
new file mode 100755
index 0000000..a8e6011
--- /dev/null
+++ b/test cases/python/11 script path/run.py
@@ -0,0 +1,7 @@
+#!/usr/bin/env python3
+
+import sys
+import subprocess
+
+if __name__ == '__main__':
+ subprocess.check_call(sys.argv[1:])