diff options
Diffstat (limited to 'test cases/common')
4 files changed, 38 insertions, 0 deletions
diff --git a/test cases/common/234 very long commmand line/codegen.py b/test cases/common/234 very long commmand line/codegen.py new file mode 100755 index 0000000..4de78ce --- /dev/null +++ b/test cases/common/234 very long commmand line/codegen.py @@ -0,0 +1,6 @@ +#!/usr/bin/env python3 + +import sys + +with open(sys.argv[2], 'w') as f: + print('int func{n}(void) {{ return {n}; }}'.format(n=sys.argv[1]), file=f) diff --git a/test cases/common/234 very long commmand line/main.c b/test cases/common/234 very long commmand line/main.c new file mode 100644 index 0000000..dbb64a8 --- /dev/null +++ b/test cases/common/234 very long commmand line/main.c @@ -0,0 +1,5 @@ +int main(int argc, char **argv) { + (void) argc; + (void) argv; + return 0; +} diff --git a/test cases/common/234 very long commmand line/meson.build b/test cases/common/234 very long commmand line/meson.build new file mode 100644 index 0000000..7a316e1 --- /dev/null +++ b/test cases/common/234 very long commmand line/meson.build @@ -0,0 +1,21 @@ +project('very long command lines', 'c') + +seq = run_command('seq.py', '1', '256').stdout().strip().split('\n') + +sources = [] +codegen = find_program('codegen.py') + +foreach i : seq + sources += custom_target('codegen' + i, + command: [codegen, i, '@OUTPUT@'], + output: 'test' + i + '.c') +endforeach + +shared_library('sharedlib', sources) +static_library('staticlib', sources) +executable('app', 'main.c', sources) + +# Also test short commandlines to make sure that doesn't regress +shared_library('sharedlib0', sources[0]) +static_library('staticlib0', sources[0]) +executable('app0', 'main.c', sources[0]) diff --git a/test cases/common/234 very long commmand line/seq.py b/test cases/common/234 very long commmand line/seq.py new file mode 100755 index 0000000..637bf57 --- /dev/null +++ b/test cases/common/234 very long commmand line/seq.py @@ -0,0 +1,6 @@ +#!/usr/bin/env python3 + +import sys + +for i in range(int(sys.argv[1]), int(sys.argv[2])): + print(i) |