aboutsummaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
Diffstat (limited to 'test cases')
-rwxr-xr-xtest cases/common/106 generatorcustom/gen-resx.py9
-rw-r--r--test cases/common/106 generatorcustom/main.c5
-rw-r--r--test cases/common/106 generatorcustom/meson.build12
3 files changed, 22 insertions, 4 deletions
diff --git a/test cases/common/106 generatorcustom/gen-resx.py b/test cases/common/106 generatorcustom/gen-resx.py
new file mode 100755
index 0000000..7d31ade
--- /dev/null
+++ b/test cases/common/106 generatorcustom/gen-resx.py
@@ -0,0 +1,9 @@
+#!/usr/bin/env python3
+
+import sys
+
+ofile = sys.argv[1]
+num = sys.argv[2]
+
+with open(ofile, 'w') as f:
+ f.write('res{}\n'.format(num))
diff --git a/test cases/common/106 generatorcustom/main.c b/test cases/common/106 generatorcustom/main.c
index 4b6857d..153dc12 100644
--- a/test cases/common/106 generatorcustom/main.c
+++ b/test cases/common/106 generatorcustom/main.c
@@ -1,7 +1,8 @@
-#include<stdio.h>
+#include <stdio.h>
-#include"alltogether.h"
+#include "alltogether.h"
int main(void) {
+ printf("%s - %s - %s - %s\n", res1, res2, res3, res4);
return 0;
}
diff --git a/test cases/common/106 generatorcustom/meson.build b/test cases/common/106 generatorcustom/meson.build
index b3f50bb..2128d21 100644
--- a/test cases/common/106 generatorcustom/meson.build
+++ b/test cases/common/106 generatorcustom/meson.build
@@ -2,12 +2,21 @@ project('generatorcustom', 'c')
creator = find_program('gen.py')
catter = find_program('catter.py')
+gen_resx = find_program('gen-resx.py')
gen = generator(creator,
output: '@BASENAME@.h',
arguments : ['@INPUT@', '@OUTPUT@'])
-hs = gen.process('res1.txt', 'res2.txt')
+res3 = custom_target('gen-res3',
+ output : 'res3.txt',
+ command : [gen_resx, '@OUTPUT@', '3'])
+
+res4 = custom_target('gen-res4',
+ output : 'res4.txt',
+ command : [gen_resx, '@OUTPUT@', '4'])
+
+hs = gen.process('res1.txt', 'res2.txt', res3, res4[0])
allinone = custom_target('alltogether',
input : hs,
@@ -17,4 +26,3 @@ allinone = custom_target('alltogether',
proggie = executable('proggie', 'main.c', allinone)
test('proggie', proggie)
-