summaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2019-09-06 18:52:50 -0400
committerXavier Claessens <xclaesse@gmail.com>2019-09-17 13:05:40 -0400
commitef3992f1cc2db7467fef2395ac3ec191eea154f0 (patch)
tree8b62e92179b0ea41fd7ac22aaa91a604362ac64e /test cases
parent5d0ced220c56a7599913c9e249b85f0d6a060821 (diff)
downloadmeson-ef3992f1cc2db7467fef2395ac3ec191eea154f0.tar.gz
configure_file(): Allow multiple inputs in command mode
Closes: #5893
Diffstat (limited to 'test cases')
-rw-r--r--test cases/common/14 configure file/check_inputs.py14
-rw-r--r--test cases/common/14 configure file/meson.build6
2 files changed, 20 insertions, 0 deletions
diff --git a/test cases/common/14 configure file/check_inputs.py b/test cases/common/14 configure file/check_inputs.py
new file mode 100644
index 000000000..1faa8ba05
--- /dev/null
+++ b/test cases/common/14 configure file/check_inputs.py
@@ -0,0 +1,14 @@
+#!/usr/bin/env python3
+
+import sys
+from pathlib import Path
+
+files = [Path(f) for f in sys.argv[1:]]
+names = [f.name for f in files]
+
+assert names == ['check_inputs.txt', 'prog.c', 'prog.c', 'prog2.c', 'prog4.c', 'prog5.c']
+for f in files[1:]:
+ assert f.exists()
+
+with files[0].open('w') as ofile:
+ ofile.write("#define ZERO_RESULT 0\n")
diff --git a/test cases/common/14 configure file/meson.build b/test cases/common/14 configure file/meson.build
index 50393e9f0..d0f3d5493 100644
--- a/test cases/common/14 configure file/meson.build
+++ b/test cases/common/14 configure file/meson.build
@@ -283,3 +283,9 @@ configure_file(output : 'config9b.h',
)
test('test9', executable('prog9', 'prog9.c'))
+
+check_inputs = find_program('check_inputs.py')
+configure_file(output : 'check_inputs.txt',
+ input : ['prog.c', files('prog2.c', 'prog4.c')],
+ command : [check_inputs, '@OUTPUT@', '@INPUT0@', '@INPUT@', files('prog5.c')]
+)