diff options
author | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
---|---|---|
committer | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
commit | af1a266670d040d2f4083ff309d732d648afba2a (patch) | |
tree | 2fc46203448ddcc6f81546d379abfaeb323575e9 /meson/test cases/failing | |
parent | e02cda008591317b1625707ff8e115a4841aa889 (diff) |
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'meson/test cases/failing')
332 files changed, 1849 insertions, 0 deletions
diff --git a/meson/test cases/failing/1 project not first/meson.build b/meson/test cases/failing/1 project not first/meson.build new file mode 100644 index 000000000..f30e155bf --- /dev/null +++ b/meson/test cases/failing/1 project not first/meson.build @@ -0,0 +1,4 @@ +var = 'assignment before project() call' +project('no worky', 'c') + +test('not run', executable('prog', 'prog.c')) diff --git a/meson/test cases/failing/1 project not first/prog.c b/meson/test cases/failing/1 project not first/prog.c new file mode 100644 index 000000000..0314ff17b --- /dev/null +++ b/meson/test cases/failing/1 project not first/prog.c @@ -0,0 +1 @@ +int main(int argc, char **argv) { return 0; } diff --git a/meson/test cases/failing/1 project not first/test.json b/meson/test cases/failing/1 project not first/test.json new file mode 100644 index 000000000..70f3c41ac --- /dev/null +++ b/meson/test cases/failing/1 project not first/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "ERROR: First statement must be a call to project" + } + ] +} diff --git a/meson/test cases/failing/10 out of bounds/meson.build b/meson/test cases/failing/10 out of bounds/meson.build new file mode 100644 index 000000000..f79167578 --- /dev/null +++ b/meson/test cases/failing/10 out of bounds/meson.build @@ -0,0 +1,4 @@ +project('out of bounds', 'c') + +x = [] +y = x[0] diff --git a/meson/test cases/failing/10 out of bounds/test.json b/meson/test cases/failing/10 out of bounds/test.json new file mode 100644 index 000000000..e27d99080 --- /dev/null +++ b/meson/test cases/failing/10 out of bounds/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/10 out of bounds/meson.build:4:0: ERROR: Index 0 out of bounds of array of size 0." + } + ] +} diff --git a/meson/test cases/failing/100 no lang/main.c b/meson/test cases/failing/100 no lang/main.c new file mode 100644 index 000000000..9b6bdc2ec --- /dev/null +++ b/meson/test cases/failing/100 no lang/main.c @@ -0,0 +1,3 @@ +int main(void) { + return 0; +} diff --git a/meson/test cases/failing/100 no lang/meson.build b/meson/test cases/failing/100 no lang/meson.build new file mode 100644 index 000000000..85c5db8e5 --- /dev/null +++ b/meson/test cases/failing/100 no lang/meson.build @@ -0,0 +1,2 @@ +project('target without lang') +executable('main', 'main.c') diff --git a/meson/test cases/failing/100 no lang/test.json b/meson/test cases/failing/100 no lang/test.json new file mode 100644 index 000000000..58dc1ac2e --- /dev/null +++ b/meson/test cases/failing/100 no lang/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/100 no lang/meson.build:2:0: ERROR: No host machine compiler for \"main.c\"" + } + ] +} diff --git a/meson/test cases/failing/101 no glib-compile-resources/meson.build b/meson/test cases/failing/101 no glib-compile-resources/meson.build new file mode 100644 index 000000000..aae0569da --- /dev/null +++ b/meson/test cases/failing/101 no glib-compile-resources/meson.build @@ -0,0 +1,8 @@ +project('no glib-compile-resources') + +if find_program('glib-compile-resources', required: false).found() + error('MESON_SKIP_TEST test only applicable when glib-compile-resources is missing.') +endif + +gnome = import('gnome') +res = gnome.compile_resources('resources', 'trivial.gresource.xml') diff --git a/meson/test cases/failing/101 no glib-compile-resources/test.json b/meson/test cases/failing/101 no glib-compile-resources/test.json new file mode 100644 index 000000000..d81b0c0db --- /dev/null +++ b/meson/test cases/failing/101 no glib-compile-resources/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/101 no glib-compile-resources/meson.build:8:0: ERROR: Program 'glib-compile-resources' not found" + } + ] +} diff --git a/meson/test cases/failing/101 no glib-compile-resources/trivial.gresource.xml b/meson/test cases/failing/101 no glib-compile-resources/trivial.gresource.xml new file mode 100644 index 000000000..1447b984d --- /dev/null +++ b/meson/test cases/failing/101 no glib-compile-resources/trivial.gresource.xml @@ -0,0 +1,3 @@ +<?xml version="1.0" encoding="UTF-8"?> +<gresources> +</gresources> diff --git a/meson/test cases/failing/102 number in combo/meson.build b/meson/test cases/failing/102 number in combo/meson.build new file mode 100644 index 000000000..1a647df1a --- /dev/null +++ b/meson/test cases/failing/102 number in combo/meson.build @@ -0,0 +1 @@ +project('number in combo') diff --git a/meson/test cases/failing/102 number in combo/nativefile.ini b/meson/test cases/failing/102 number in combo/nativefile.ini new file mode 100644 index 000000000..55f10fc20 --- /dev/null +++ b/meson/test cases/failing/102 number in combo/nativefile.ini @@ -0,0 +1,2 @@ +[built-in options] +optimization = 1 diff --git a/meson/test cases/failing/102 number in combo/test.json b/meson/test cases/failing/102 number in combo/test.json new file mode 100644 index 000000000..8e70a6014 --- /dev/null +++ b/meson/test cases/failing/102 number in combo/test.json @@ -0,0 +1,5 @@ +{ + "stdout": [ + { "line": "test cases/failing/102 number in combo/meson.build:1:0: ERROR: Value \"1\" (of type \"number\") for combo option \"Optimization level\" is not one of the choices. Possible choices are (as string): \"0\", \"g\", \"1\", \"2\", \"3\", \"s\"." } + ] +} diff --git a/meson/test cases/failing/103 bool in combo/meson.build b/meson/test cases/failing/103 bool in combo/meson.build new file mode 100644 index 000000000..c5efd67ea --- /dev/null +++ b/meson/test cases/failing/103 bool in combo/meson.build @@ -0,0 +1 @@ +project('bool in combo') diff --git a/meson/test cases/failing/103 bool in combo/meson_options.txt b/meson/test cases/failing/103 bool in combo/meson_options.txt new file mode 100644 index 000000000..0c8f5de00 --- /dev/null +++ b/meson/test cases/failing/103 bool in combo/meson_options.txt @@ -0,0 +1,5 @@ +option( + 'opt', + type : 'combo', + choices : ['true', 'false'] +) diff --git a/meson/test cases/failing/103 bool in combo/nativefile.ini b/meson/test cases/failing/103 bool in combo/nativefile.ini new file mode 100644 index 000000000..b423957cf --- /dev/null +++ b/meson/test cases/failing/103 bool in combo/nativefile.ini @@ -0,0 +1,2 @@ +[project options] +opt = true diff --git a/meson/test cases/failing/103 bool in combo/test.json b/meson/test cases/failing/103 bool in combo/test.json new file mode 100644 index 000000000..48d4cc39a --- /dev/null +++ b/meson/test cases/failing/103 bool in combo/test.json @@ -0,0 +1,5 @@ +{ + "stdout": [ + { "line": "test cases/failing/103 bool in combo/meson.build:1:0: ERROR: Value \"True\" (of type \"boolean\") for combo option \"opt\" is not one of the choices. Possible choices are (as string): \"true\", \"false\"." } + ] +} diff --git a/meson/test cases/failing/104 compiler no lang/meson.build b/meson/test cases/failing/104 compiler no lang/meson.build new file mode 100644 index 000000000..366bbdd5d --- /dev/null +++ b/meson/test cases/failing/104 compiler no lang/meson.build @@ -0,0 +1,2 @@ +project('compiler without lang') +meson.get_compiler('c') diff --git a/meson/test cases/failing/104 compiler no lang/test.json b/meson/test cases/failing/104 compiler no lang/test.json new file mode 100644 index 000000000..d8cc96eef --- /dev/null +++ b/meson/test cases/failing/104 compiler no lang/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/104 compiler no lang/meson.build:2:6: ERROR: Tried to access compiler for language \"c\", not specified for host machine." + } + ] +} diff --git a/meson/test cases/failing/105 no fallback/meson.build b/meson/test cases/failing/105 no fallback/meson.build new file mode 100644 index 000000000..0101bb84e --- /dev/null +++ b/meson/test cases/failing/105 no fallback/meson.build @@ -0,0 +1,2 @@ +project('no fallback', 'c') +foob_dep = dependency('foob', allow_fallback: false, required: true) diff --git a/meson/test cases/failing/105 no fallback/subprojects/foob/meson.build b/meson/test cases/failing/105 no fallback/subprojects/foob/meson.build new file mode 100644 index 000000000..b2c4814e2 --- /dev/null +++ b/meson/test cases/failing/105 no fallback/subprojects/foob/meson.build @@ -0,0 +1,2 @@ +project('foob', 'c') +meson.override_dependency('foob', declare_dependency()) diff --git a/meson/test cases/failing/105 no fallback/test.json b/meson/test cases/failing/105 no fallback/test.json new file mode 100644 index 000000000..e0340616c --- /dev/null +++ b/meson/test cases/failing/105 no fallback/test.json @@ -0,0 +1,8 @@ +{ + "stdout": [ + { + "match": "re", + "line": ".*/meson\\.build:2:0: ERROR: (Pkg-config binary for machine MachineChoice\\.HOST not found\\. Giving up\\.|Dependency \"foob\" not found, tried .*)" + } + ] +} diff --git a/meson/test cases/failing/106 feature require/meson.build b/meson/test cases/failing/106 feature require/meson.build new file mode 100644 index 000000000..d976ae8d6 --- /dev/null +++ b/meson/test cases/failing/106 feature require/meson.build @@ -0,0 +1,2 @@ +project('no fallback', 'c') +foo = get_option('reqfeature').require(false, error_message: 'frobnicator not available') diff --git a/meson/test cases/failing/106 feature require/meson_options.txt b/meson/test cases/failing/106 feature require/meson_options.txt new file mode 100644 index 000000000..d6f2ce656 --- /dev/null +++ b/meson/test cases/failing/106 feature require/meson_options.txt @@ -0,0 +1,2 @@ +option('reqfeature', type : 'feature', value : 'enabled', description : 'A required feature') + diff --git a/meson/test cases/failing/106 feature require/test.json b/meson/test cases/failing/106 feature require/test.json new file mode 100644 index 000000000..7c4640de0 --- /dev/null +++ b/meson/test cases/failing/106 feature require/test.json @@ -0,0 +1,8 @@ +{ + "stdout": [ + { + "match": "re", + "line": ".*/meson\\.build:2:0: ERROR: Feature reqfeature cannot be enabled: frobnicator not available" + } + ] +} diff --git a/meson/test cases/failing/107 no build get_external_property/meson.build b/meson/test cases/failing/107 no build get_external_property/meson.build new file mode 100644 index 000000000..8a4215c9f --- /dev/null +++ b/meson/test cases/failing/107 no build get_external_property/meson.build @@ -0,0 +1,3 @@ +project('missing property') + +message(meson.get_external_property('nonexisting', native : true)) diff --git a/meson/test cases/failing/107 no build get_external_property/test.json b/meson/test cases/failing/107 no build get_external_property/test.json new file mode 100644 index 000000000..b95427efd --- /dev/null +++ b/meson/test cases/failing/107 no build get_external_property/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/107 no build get_external_property/meson.build:3:0: ERROR: Unknown property for build machine: nonexisting" + } + ] +} diff --git a/meson/test cases/failing/108 enter subdir twice/meson.build b/meson/test cases/failing/108 enter subdir twice/meson.build new file mode 100644 index 000000000..9343233d5 --- /dev/null +++ b/meson/test cases/failing/108 enter subdir twice/meson.build @@ -0,0 +1,3 @@ +project('subdir2', 'c') +subdir('sub') +subdir('sub') diff --git a/meson/test cases/failing/108 enter subdir twice/sub/meson.build b/meson/test cases/failing/108 enter subdir twice/sub/meson.build new file mode 100644 index 000000000..d036a3fe5 --- /dev/null +++ b/meson/test cases/failing/108 enter subdir twice/sub/meson.build @@ -0,0 +1 @@ +message('Now in subdir') diff --git a/meson/test cases/failing/108 enter subdir twice/test.json b/meson/test cases/failing/108 enter subdir twice/test.json new file mode 100644 index 000000000..0a8e12769 --- /dev/null +++ b/meson/test cases/failing/108 enter subdir twice/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/108 enter subdir twice/meson.build:3:0: ERROR: Tried to enter directory \"sub\", which has already been visited." + } + ] +} diff --git a/meson/test cases/failing/109 invalid fstring/meson.build b/meson/test cases/failing/109 invalid fstring/meson.build new file mode 100644 index 000000000..dd22f56b2 --- /dev/null +++ b/meson/test cases/failing/109 invalid fstring/meson.build @@ -0,0 +1,4 @@ +project('invalid-fstring', 'c') + +dict = {'key': true} +s = f'invalid fstring: @dict@' diff --git a/meson/test cases/failing/109 invalid fstring/test.json b/meson/test cases/failing/109 invalid fstring/test.json new file mode 100644 index 000000000..71d8f5927 --- /dev/null +++ b/meson/test cases/failing/109 invalid fstring/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/109 invalid fstring/meson.build:4:0: ERROR: Identifier \"dict\" does not name a formattable variable (has to be an integer, a string, a floating point number or a boolean)." + } + ] +} diff --git a/meson/test cases/failing/11 object arithmetic/meson.build b/meson/test cases/failing/11 object arithmetic/meson.build new file mode 100644 index 000000000..9a7a6565c --- /dev/null +++ b/meson/test cases/failing/11 object arithmetic/meson.build @@ -0,0 +1,3 @@ +project('object arithmetic', 'c') + +foo = '5' + meson diff --git a/meson/test cases/failing/11 object arithmetic/test.json b/meson/test cases/failing/11 object arithmetic/test.json new file mode 100644 index 000000000..5339facda --- /dev/null +++ b/meson/test cases/failing/11 object arithmetic/test.json @@ -0,0 +1,8 @@ +{ + "stdout": [ + { + "match": "re", + "line": "test cases/failing/11 object arithmetic/meson\\.build:3:0: ERROR: Invalid use of addition: .*" + } + ] +} diff --git a/meson/test cases/failing/110 invalid fstring/meson.build b/meson/test cases/failing/110 invalid fstring/meson.build new file mode 100644 index 000000000..973df3098 --- /dev/null +++ b/meson/test cases/failing/110 invalid fstring/meson.build @@ -0,0 +1,3 @@ +project('invalid-fstring', 'c') + +z = f'invalid fstring: @foo@' diff --git a/meson/test cases/failing/110 invalid fstring/test.json b/meson/test cases/failing/110 invalid fstring/test.json new file mode 100644 index 000000000..bfd0e2d42 --- /dev/null +++ b/meson/test cases/failing/110 invalid fstring/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/110 invalid fstring/meson.build:3:0: ERROR: Identifier \"foo\" does not name a variable." + } + ] +} diff --git a/meson/test cases/failing/111 compiler argument checking/meson.build b/meson/test cases/failing/111 compiler argument checking/meson.build new file mode 100644 index 000000000..bb1f44768 --- /dev/null +++ b/meson/test cases/failing/111 compiler argument checking/meson.build @@ -0,0 +1,4 @@ +project('compiler argument checking test', 'c') + +cc = meson.get_compiler('c') +add_project_arguments(cc.get_supported_arguments('-meson-goober-arg-for-testing', checked : 'require'), language : 'c') diff --git a/meson/test cases/failing/111 compiler argument checking/test.json b/meson/test cases/failing/111 compiler argument checking/test.json new file mode 100644 index 000000000..f41f2d2cf --- /dev/null +++ b/meson/test cases/failing/111 compiler argument checking/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/111 compiler argument checking/meson.build:4:0: ERROR: Compiler for C does not support \"-meson-goober-arg-for-testing\"" + } + ] +} diff --git a/meson/test cases/failing/112 empty fallback/meson.build b/meson/test cases/failing/112 empty fallback/meson.build new file mode 100644 index 000000000..f4eb5feb9 --- /dev/null +++ b/meson/test cases/failing/112 empty fallback/meson.build @@ -0,0 +1,6 @@ +project('empty fallback') + +# There is a subproject named 'foo' that overrides that dependency, +# but `fallback: []` should not allow to use it. Same behaviour than with +# `allow_fallback: false` +dependency('foo', fallback: []) diff --git a/meson/test cases/failing/112 empty fallback/subprojects/foo/meson.build b/meson/test cases/failing/112 empty fallback/subprojects/foo/meson.build new file mode 100644 index 000000000..c9e134b5e --- /dev/null +++ b/meson/test cases/failing/112 empty fallback/subprojects/foo/meson.build @@ -0,0 +1,3 @@ +project('foo') + +meson.override_dependency('foo', declare_dependency()) diff --git a/meson/test cases/failing/112 empty fallback/test.json b/meson/test cases/failing/112 empty fallback/test.json new file mode 100644 index 000000000..89520efc3 --- /dev/null +++ b/meson/test cases/failing/112 empty fallback/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/112 empty fallback/meson.build:6:0: ERROR: Dependency \"foo\" not found, tried pkgconfig and cmake" + } + ] +} diff --git a/meson/test cases/failing/113 cmake executable dependency/meson.build b/meson/test cases/failing/113 cmake executable dependency/meson.build new file mode 100644 index 000000000..bfb03ef20 --- /dev/null +++ b/meson/test cases/failing/113 cmake executable dependency/meson.build @@ -0,0 +1,9 @@ +project('cmake-executable-dependency', ['c', 'cpp']) + +if not find_program('cmake', required: false).found() + error('MESON_SKIP_TEST CMake is not installed') +endif + +cmake = import('cmake') +cmlib = cmake.subproject('cmlib') +maind = cmlib.dependency('main') diff --git a/meson/test cases/failing/113 cmake executable dependency/subprojects/cmlib/CMakeLists.txt b/meson/test cases/failing/113 cmake executable dependency/subprojects/cmlib/CMakeLists.txt new file mode 100644 index 000000000..006787986 --- /dev/null +++ b/meson/test cases/failing/113 cmake executable dependency/subprojects/cmlib/CMakeLists.txt @@ -0,0 +1,5 @@ +cmake_minimum_required(VERSION 3.5) + +project(cmlib) + +add_executable(main main.c) diff --git a/meson/test cases/failing/113 cmake executable dependency/subprojects/cmlib/main.c b/meson/test cases/failing/113 cmake executable dependency/subprojects/cmlib/main.c new file mode 100644 index 000000000..9b6bdc2ec --- /dev/null +++ b/meson/test cases/failing/113 cmake executable dependency/subprojects/cmlib/main.c @@ -0,0 +1,3 @@ +int main(void) { + return 0; +} diff --git a/meson/test cases/failing/113 cmake executable dependency/test.json b/meson/test cases/failing/113 cmake executable dependency/test.json new file mode 100644 index 000000000..1cb4a0f0a --- /dev/null +++ b/meson/test cases/failing/113 cmake executable dependency/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/113 cmake executable dependency/meson.build:9:0: ERROR: main is an executable and does not support the dependency() method. Use target() instead." + } + ] +} diff --git a/meson/test cases/failing/114 allow_fallback with fallback/meson.build b/meson/test cases/failing/114 allow_fallback with fallback/meson.build new file mode 100644 index 000000000..2874e424c --- /dev/null +++ b/meson/test cases/failing/114 allow_fallback with fallback/meson.build @@ -0,0 +1,3 @@ +project('fallback and allow_fallback') + +dependency('foo', fallback: 'foo', allow_fallback: false) diff --git a/meson/test cases/failing/114 allow_fallback with fallback/test.json b/meson/test cases/failing/114 allow_fallback with fallback/test.json new file mode 100644 index 000000000..1e5712e78 --- /dev/null +++ b/meson/test cases/failing/114 allow_fallback with fallback/test.json @@ -0,0 +1,8 @@ +{ + "stdout": [ + { + "line": "test cases/failing/114 allow_fallback with fallback/meson.build:3:0: ERROR: \"fallback\" and \"allow_fallback\" arguments are mutually exclusive" + } + ] +} + diff --git a/meson/test cases/failing/12 string arithmetic/meson.build b/meson/test cases/failing/12 string arithmetic/meson.build new file mode 100644 index 000000000..c02a865a4 --- /dev/null +++ b/meson/test cases/failing/12 string arithmetic/meson.build @@ -0,0 +1,3 @@ +project('string arithmetic', 'c') + +foo = 'a' + 3 diff --git a/meson/test cases/failing/12 string arithmetic/test.json b/meson/test cases/failing/12 string arithmetic/test.json new file mode 100644 index 000000000..476f9bb20 --- /dev/null +++ b/meson/test cases/failing/12 string arithmetic/test.json @@ -0,0 +1,8 @@ +{ + "stdout": [ + { + "match": "re", + "line": "test cases/failing/12 string arithmetic/meson\\.build:3:0: ERROR: Invalid use of addition: .*" + } + ] +} diff --git a/meson/test cases/failing/13 array arithmetic/meson.build b/meson/test cases/failing/13 array arithmetic/meson.build new file mode 100644 index 000000000..3ddf06092 --- /dev/null +++ b/meson/test cases/failing/13 array arithmetic/meson.build @@ -0,0 +1,3 @@ +project('array arithmetic', 'c') + +foo = ['a', 'b'] * 3 diff --git a/meson/test cases/failing/13 array arithmetic/test.json b/meson/test cases/failing/13 array arithmetic/test.json new file mode 100644 index 000000000..55056ce6d --- /dev/null +++ b/meson/test cases/failing/13 array arithmetic/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/13 array arithmetic/meson.build:3:0: ERROR: Multiplication works only with integers." + } + ] +} diff --git a/meson/test cases/failing/14 invalid option name/meson.build b/meson/test cases/failing/14 invalid option name/meson.build new file mode 100644 index 000000000..b99fd21ad --- /dev/null +++ b/meson/test cases/failing/14 invalid option name/meson.build @@ -0,0 +1 @@ +project('foo', 'c') diff --git a/meson/test cases/failing/14 invalid option name/meson_options.txt b/meson/test cases/failing/14 invalid option name/meson_options.txt new file mode 100644 index 000000000..aab6ae8de --- /dev/null +++ b/meson/test cases/failing/14 invalid option name/meson_options.txt @@ -0,0 +1 @@ +option('invalid:name', type : 'boolean', value : false) diff --git a/meson/test cases/failing/14 invalid option name/test.json b/meson/test cases/failing/14 invalid option name/test.json new file mode 100644 index 000000000..71e685da4 --- /dev/null +++ b/meson/test cases/failing/14 invalid option name/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/14 invalid option name/meson_options.txt:1:0: ERROR: Option names can only contain letters, numbers or dashes." + } + ] +} diff --git a/meson/test cases/failing/15 kwarg before arg/meson.build b/meson/test cases/failing/15 kwarg before arg/meson.build new file mode 100644 index 000000000..f07d950bd --- /dev/null +++ b/meson/test cases/failing/15 kwarg before arg/meson.build @@ -0,0 +1,3 @@ +project('kwarg before arg', 'c') + +executable(sources : 'prog.c', 'prog') diff --git a/meson/test cases/failing/15 kwarg before arg/prog.c b/meson/test cases/failing/15 kwarg before arg/prog.c new file mode 100644 index 000000000..0314ff17b --- /dev/null +++ b/meson/test cases/failing/15 kwarg before arg/prog.c @@ -0,0 +1 @@ +int main(int argc, char **argv) { return 0; } diff --git a/meson/test cases/failing/15 kwarg before arg/test.json b/meson/test cases/failing/15 kwarg before arg/test.json new file mode 100644 index 000000000..c7f72c35e --- /dev/null +++ b/meson/test cases/failing/15 kwarg before arg/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/15 kwarg before arg/meson.build:3:0: ERROR: All keyword arguments must be after positional arguments." + } + ] +} diff --git a/meson/test cases/failing/16 extract from subproject/main.c b/meson/test cases/failing/16 extract from subproject/main.c new file mode 100644 index 000000000..6c8ecaea5 --- /dev/null +++ b/meson/test cases/failing/16 extract from subproject/main.c @@ -0,0 +1,5 @@ +int sub_lib_method(void); + +int main(void) { + return 1337 - sub_lib_method(); +} diff --git a/meson/test cases/failing/16 extract from subproject/meson.build b/meson/test cases/failing/16 extract from subproject/meson.build new file mode 100644 index 000000000..286aaa191 --- /dev/null +++ b/meson/test cases/failing/16 extract from subproject/meson.build @@ -0,0 +1,9 @@ +project('extract subproject object', 'c') + +sub = subproject('sub_project') +lib = sub.get_variable('lib') + +exe = executable('exe', 'main.c', + objects : lib.extract_objects('sub_lib.c')) + +test('extraction test', exe) diff --git a/meson/test cases/failing/16 extract from subproject/subprojects/sub_project/meson.build b/meson/test cases/failing/16 extract from subproject/subprojects/sub_project/meson.build new file mode 100644 index 000000000..0810df503 --- /dev/null +++ b/meson/test cases/failing/16 extract from subproject/subprojects/sub_project/meson.build @@ -0,0 +1,3 @@ +project('extract subproject object -- subproject', 'c') + +lib = library('sub_lib', 'sub_lib.c') diff --git a/meson/test cases/failing/16 extract from subproject/subprojects/sub_project/sub_lib.c b/meson/test cases/failing/16 extract from subproject/subprojects/sub_project/sub_lib.c new file mode 100644 index 000000000..be3c9aae2 --- /dev/null +++ b/meson/test cases/failing/16 extract from subproject/subprojects/sub_project/sub_lib.c @@ -0,0 +1,3 @@ +int sub_lib_method() { + return 1337; +} diff --git a/meson/test cases/failing/16 extract from subproject/test.json b/meson/test cases/failing/16 extract from subproject/test.json new file mode 100644 index 000000000..2e32904dd --- /dev/null +++ b/meson/test cases/failing/16 extract from subproject/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/16 extract from subproject/meson.build:6:0: ERROR: Tried to extract objects from a different subproject." + } + ] +} diff --git a/meson/test cases/failing/17 same target/file.c b/meson/test cases/failing/17 same target/file.c new file mode 100644 index 000000000..741237235 --- /dev/null +++ b/meson/test cases/failing/17 same target/file.c @@ -0,0 +1 @@ +int func() { return 0; } diff --git a/meson/test cases/failing/17 same target/meson.build b/meson/test cases/failing/17 same target/meson.build new file mode 100644 index 000000000..ee586d0f4 --- /dev/null +++ b/meson/test cases/failing/17 same target/meson.build @@ -0,0 +1,4 @@ +project('same target', 'c') + +static_library('foo', 'file.c') +static_library('foo', 'file.c') diff --git a/meson/test cases/failing/17 same target/test.json b/meson/test cases/failing/17 same target/test.json new file mode 100644 index 000000000..0005ba4a8 --- /dev/null +++ b/meson/test cases/failing/17 same target/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/17 same target/meson.build:4:0: ERROR: Tried to create target \"foo\", but a target of that name already exists." + } + ] +} diff --git a/meson/test cases/failing/18 wrong plusassign/meson.build b/meson/test cases/failing/18 wrong plusassign/meson.build new file mode 100644 index 000000000..dfb9e6d53 --- /dev/null +++ b/meson/test cases/failing/18 wrong plusassign/meson.build @@ -0,0 +1,3 @@ +project('false plusassign', 'c') + +3 += 4 diff --git a/meson/test cases/failing/18 wrong plusassign/test.json b/meson/test cases/failing/18 wrong plusassign/test.json new file mode 100644 index 000000000..c698f85b9 --- /dev/null +++ b/meson/test cases/failing/18 wrong plusassign/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/18 wrong plusassign/meson.build:3:0: ERROR: Plusassignment target must be an id." + } + ] +} diff --git a/meson/test cases/failing/19 target clash/clash.c b/meson/test cases/failing/19 target clash/clash.c new file mode 100644 index 000000000..2daa06cf6 --- /dev/null +++ b/meson/test cases/failing/19 target clash/clash.c @@ -0,0 +1,6 @@ +#include<stdio.h> + +int main(int argc, char **argv) { + printf("Clash 2.\n"); + return 0; +} diff --git a/meson/test cases/failing/19 target clash/meson.build b/meson/test cases/failing/19 target clash/meson.build new file mode 100644 index 000000000..4fd09348e --- /dev/null +++ b/meson/test cases/failing/19 target clash/meson.build @@ -0,0 +1,15 @@ +project('clash', 'c') + +# This setup causes a namespace clash when two Meson targets would +# produce a Ninja targets with the same name. It only works on +# unix, because on Windows the target has a '.exe' suffix. +# +# This test might fail to work on different backends or when +# output location is redirected. + +if host_machine.system() == 'windows' or host_machine.system() == 'cygwin' + error('MESON_SKIP_TEST test only works on platforms where executables have no suffix.') +endif + +executable('clash', 'clash.c') +run_target('clash', command: ['echo', 'clash 1']) diff --git a/meson/test cases/failing/19 target clash/test.json b/meson/test cases/failing/19 target clash/test.json new file mode 100644 index 000000000..d22b894c4 --- /dev/null +++ b/meson/test cases/failing/19 target clash/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "ERROR: Multiple producers for Ninja target \"clash\". Please rename your targets." + } + ] +} diff --git a/meson/test cases/failing/2 missing file/meson.build b/meson/test cases/failing/2 missing file/meson.build new file mode 100644 index 000000000..6b9133d62 --- /dev/null +++ b/meson/test cases/failing/2 missing file/meson.build @@ -0,0 +1,3 @@ +project('missing file', 'c') + +executable('prog', 'missing.c') diff --git a/meson/test cases/failing/2 missing file/test.json b/meson/test cases/failing/2 missing file/test.json new file mode 100644 index 000000000..b95b8b082 --- /dev/null +++ b/meson/test cases/failing/2 missing file/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/2 missing file/meson.build:3:0: ERROR: File missing.c does not exist." + } + ] +} diff --git a/meson/test cases/failing/20 version/meson.build b/meson/test cases/failing/20 version/meson.build new file mode 100644 index 000000000..9a3a851cb --- /dev/null +++ b/meson/test cases/failing/20 version/meson.build @@ -0,0 +1 @@ +project('version mismatch', 'c', meson_version : '>100.0.0') diff --git a/meson/test cases/failing/20 version/test.json b/meson/test cases/failing/20 version/test.json new file mode 100644 index 000000000..f3306246b --- /dev/null +++ b/meson/test cases/failing/20 version/test.json @@ -0,0 +1,8 @@ +{ + "stdout": [ + { + "match": "re", + "line": "test cases/failing/20 version/meson\\.build:1:0: ERROR: Meson version is .* but project requires >100\\.0\\.0" + } + ] +} diff --git a/meson/test cases/failing/21 subver/meson.build b/meson/test cases/failing/21 subver/meson.build new file mode 100644 index 000000000..854f13ce0 --- /dev/null +++ b/meson/test cases/failing/21 subver/meson.build @@ -0,0 +1,3 @@ +project('master', 'c') + +x = subproject('foo', version : '>1.0.0') diff --git a/meson/test cases/failing/21 subver/subprojects/foo/meson.build b/meson/test cases/failing/21 subver/subprojects/foo/meson.build new file mode 100644 index 000000000..f4ff53548 --- /dev/null +++ b/meson/test cases/failing/21 subver/subprojects/foo/meson.build @@ -0,0 +1 @@ +project('foo', 'c', version : '1.0.0') diff --git a/meson/test cases/failing/21 subver/test.json b/meson/test cases/failing/21 subver/test.json new file mode 100644 index 000000000..f8cfd3a1f --- /dev/null +++ b/meson/test cases/failing/21 subver/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/21 subver/meson.build:3:0: ERROR: Subproject foo version is 1.0.0 but >1.0.0 required." + } + ] +} diff --git a/meson/test cases/failing/22 assert/meson.build b/meson/test cases/failing/22 assert/meson.build new file mode 100644 index 000000000..ae3a19ca1 --- /dev/null +++ b/meson/test cases/failing/22 assert/meson.build @@ -0,0 +1,3 @@ +project('failing assert', 'c') + +assert(false, 'I am fail.') diff --git a/meson/test cases/failing/22 assert/test.json b/meson/test cases/failing/22 assert/test.json new file mode 100644 index 000000000..edae9996e --- /dev/null +++ b/meson/test cases/failing/22 assert/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/22 assert/meson.build:3:0: ERROR: Assert failed: I am fail." + } + ] +} diff --git a/meson/test cases/failing/23 rel testdir/meson.build b/meson/test cases/failing/23 rel testdir/meson.build new file mode 100644 index 000000000..c10558b34 --- /dev/null +++ b/meson/test cases/failing/23 rel testdir/meson.build @@ -0,0 +1,4 @@ +project('nonabs workdir', 'c') + +exe = executable('simple', 'simple.c') +test('simple', exe, workdir : '.') diff --git a/meson/test cases/failing/23 rel testdir/simple.c b/meson/test cases/failing/23 rel testdir/simple.c new file mode 100644 index 000000000..11b7fad8e --- /dev/null +++ b/meson/test cases/failing/23 rel testdir/simple.c @@ -0,0 +1,3 @@ +int main(int argc, char **argv) { + return 0; +} diff --git a/meson/test cases/failing/23 rel testdir/test.json b/meson/test cases/failing/23 rel testdir/test.json new file mode 100644 index 000000000..79ab48a43 --- /dev/null +++ b/meson/test cases/failing/23 rel testdir/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/23 rel testdir/meson.build:4:0: ERROR: benchmark keyword argument \"workdir\" must be an absolute path" + } + ] +} diff --git a/meson/test cases/failing/24 int conversion/meson.build b/meson/test cases/failing/24 int conversion/meson.build new file mode 100644 index 000000000..51f6c7e16 --- /dev/null +++ b/meson/test cases/failing/24 int conversion/meson.build @@ -0,0 +1,3 @@ +project('int conversion', 'c') + +'notanumber'.to_int() diff --git a/meson/test cases/failing/24 int conversion/test.json b/meson/test cases/failing/24 int conversion/test.json new file mode 100644 index 000000000..e749928fa --- /dev/null +++ b/meson/test cases/failing/24 int conversion/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/24 int conversion/meson.build:3:13: ERROR: String 'notanumber' cannot be converted to int" + } + ] +} diff --git a/meson/test cases/failing/25 badlang/meson.build b/meson/test cases/failing/25 badlang/meson.build new file mode 100644 index 000000000..f6bf0cca0 --- /dev/null +++ b/meson/test cases/failing/25 badlang/meson.build @@ -0,0 +1,3 @@ +project('badlang', 'c') + +add_languages('nonexisting') diff --git a/meson/test cases/failing/25 badlang/test.json b/meson/test cases/failing/25 badlang/test.json new file mode 100644 index 000000000..0b23fd7e5 --- /dev/null +++ b/meson/test cases/failing/25 badlang/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/25 badlang/meson.build:3:0: ERROR: Tried to use unknown language \"nonexisting\"." + } + ] +} diff --git a/meson/test cases/failing/26 output subdir/foo.in b/meson/test cases/failing/26 output subdir/foo.in new file mode 100644 index 000000000..3d1bf19eb --- /dev/null +++ b/meson/test cases/failing/26 output subdir/foo.in @@ -0,0 +1 @@ +Nothing here. diff --git a/meson/test cases/failing/26 output subdir/meson.build b/meson/test cases/failing/26 output subdir/meson.build new file mode 100644 index 000000000..4eb422ce4 --- /dev/null +++ b/meson/test cases/failing/26 output subdir/meson.build @@ -0,0 +1,5 @@ +project('outdir path', 'c') + +configure_file(input : 'foo.in', + output : 'subdir/foo', + copy: true) diff --git a/meson/test cases/failing/26 output subdir/subdir/dummy.txt b/meson/test cases/failing/26 output subdir/subdir/dummy.txt new file mode 100644 index 000000000..f10acf3e5 --- /dev/null +++ b/meson/test cases/failing/26 output subdir/subdir/dummy.txt @@ -0,0 +1,2 @@ +I'm only here because Git is stupid about empty dirs. + diff --git a/meson/test cases/failing/26 output subdir/test.json b/meson/test cases/failing/26 output subdir/test.json new file mode 100644 index 000000000..796468db1 --- /dev/null +++ b/meson/test cases/failing/26 output subdir/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/26 output subdir/meson.build:3:0: ERROR: Output file name must not contain a subdirectory." + } + ] +} diff --git a/meson/test cases/failing/27 noprog use/meson.build b/meson/test cases/failing/27 noprog use/meson.build new file mode 100644 index 000000000..e4de42fbd --- /dev/null +++ b/meson/test cases/failing/27 noprog use/meson.build @@ -0,0 +1,9 @@ +project('using not found exe', 'c') + +nope = find_program('nonexisting', required : false) + +custom_target( 'aa', + input: 'meson.build', + output: 'foobar', + command: [nope, '@INPUT@', '@OUTPUT@'] +) diff --git a/meson/test cases/failing/27 noprog use/test.json b/meson/test cases/failing/27 noprog use/test.json new file mode 100644 index 000000000..b84562e2b --- /dev/null +++ b/meson/test cases/failing/27 noprog use/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/27 noprog use/meson.build:5:0: ERROR: Tried to use not-found external program in \"command\"" + } + ] +} diff --git a/meson/test cases/failing/28 no crossprop/meson.build b/meson/test cases/failing/28 no crossprop/meson.build new file mode 100644 index 000000000..bd3a743d6 --- /dev/null +++ b/meson/test cases/failing/28 no crossprop/meson.build @@ -0,0 +1,3 @@ +project('no crossprop', 'c') + +message(meson.get_cross_property('nonexisting')) diff --git a/meson/test cases/failing/28 no crossprop/test.json b/meson/test cases/failing/28 no crossprop/test.json new file mode 100644 index 000000000..6fb9dce66 --- /dev/null +++ b/meson/test cases/failing/28 no crossprop/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/28 no crossprop/meson.build:3:0: ERROR: Unknown property for host machine: nonexisting" + } + ] +} diff --git a/meson/test cases/failing/29 nested ternary/meson.build b/meson/test cases/failing/29 nested ternary/meson.build new file mode 100644 index 000000000..f9c2e5f8a --- /dev/null +++ b/meson/test cases/failing/29 nested ternary/meson.build @@ -0,0 +1,3 @@ +project('nested ternary', 'c') + +x = true ? (false ? 1 : 0) : 2 diff --git a/meson/test cases/failing/29 nested ternary/test.json b/meson/test cases/failing/29 nested ternary/test.json new file mode 100644 index 000000000..ba0501372 --- /dev/null +++ b/meson/test cases/failing/29 nested ternary/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/29 nested ternary/meson.build:3:12: ERROR: Nested ternary operators are not allowed." + } + ] +} diff --git a/meson/test cases/failing/3 missing subdir/meson.build b/meson/test cases/failing/3 missing subdir/meson.build new file mode 100644 index 000000000..fef8c4bca --- /dev/null +++ b/meson/test cases/failing/3 missing subdir/meson.build @@ -0,0 +1,3 @@ +project('subdir', 'c') + +subdir('missing') diff --git a/meson/test cases/failing/3 missing subdir/test.json b/meson/test cases/failing/3 missing subdir/test.json new file mode 100644 index 000000000..562de2545 --- /dev/null +++ b/meson/test cases/failing/3 missing subdir/test.json @@ -0,0 +1,9 @@ +{ + "stdout": [ + { + "comment": "'missing/meson.build' gets transformed with os.path.sep separators", + "match": "re", + "line": "test cases/failing/3 missing subdir/meson\\.build:3:0: ERROR: Non\\-existent build file 'missing[\\\\/]meson\\.build'" + } + ] +} diff --git a/meson/test cases/failing/30 invalid man extension/foo.a1 b/meson/test cases/failing/30 invalid man extension/foo.a1 new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/meson/test cases/failing/30 invalid man extension/foo.a1 diff --git a/meson/test cases/failing/30 invalid man extension/meson.build b/meson/test cases/failing/30 invalid man extension/meson.build new file mode 100644 index 000000000..45eddca40 --- /dev/null +++ b/meson/test cases/failing/30 invalid man extension/meson.build @@ -0,0 +1,2 @@ +project('man install', 'c') +m1 = install_man('foo.a1') diff --git a/meson/test cases/failing/30 invalid man extension/test.json b/meson/test cases/failing/30 invalid man extension/test.json new file mode 100644 index 000000000..3e5f45de5 --- /dev/null +++ b/meson/test cases/failing/30 invalid man extension/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/30 invalid man extension/meson.build:2:0: ERROR: Man file must have a file extension of a number between 1 and 9" + } + ] +} diff --git a/meson/test cases/failing/31 no man extension/foo b/meson/test cases/failing/31 no man extension/foo new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/meson/test cases/failing/31 no man extension/foo diff --git a/meson/test cases/failing/31 no man extension/meson.build b/meson/test cases/failing/31 no man extension/meson.build new file mode 100644 index 000000000..bf835713f --- /dev/null +++ b/meson/test cases/failing/31 no man extension/meson.build @@ -0,0 +1,2 @@ +project('man install', 'c') +m1 = install_man('foo') diff --git a/meson/test cases/failing/31 no man extension/test.json b/meson/test cases/failing/31 no man extension/test.json new file mode 100644 index 000000000..0972da1f3 --- /dev/null +++ b/meson/test cases/failing/31 no man extension/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/31 no man extension/meson.build:2:0: ERROR: Man file must have a file extension of a number between 1 and 9" + } + ] +} diff --git a/meson/test cases/failing/32 exe static shared/meson.build b/meson/test cases/failing/32 exe static shared/meson.build new file mode 100644 index 000000000..2ae512583 --- /dev/null +++ b/meson/test cases/failing/32 exe static shared/meson.build @@ -0,0 +1,11 @@ +project('statchain', 'c') + +host_system = host_machine.system() +if host_system == 'windows' or host_system == 'darwin' + error('MESON_SKIP_TEST test only fails on Linux and BSD') +endif + +statlib = static_library('stat', 'stat.c', pic : false) +shlib2 = shared_library('shr2', 'shlib2.c', link_with : statlib) +exe = executable('prog', 'prog.c', link_with : shlib2) +test('runtest', exe) diff --git a/meson/test cases/failing/32 exe static shared/prog.c b/meson/test cases/failing/32 exe static shared/prog.c new file mode 100644 index 000000000..26603b694 --- /dev/null +++ b/meson/test cases/failing/32 exe static shared/prog.c @@ -0,0 +1,10 @@ +int shlibfunc2(); +int statlibfunc(); + +int main(int argc, char **argv) { + if (statlibfunc() != 42) + return 1; + if (shlibfunc2() != 24) + return 1; + return 0; +} diff --git a/meson/test cases/failing/32 exe static shared/shlib2.c b/meson/test cases/failing/32 exe static shared/shlib2.c new file mode 100644 index 000000000..5b68843dc --- /dev/null +++ b/meson/test cases/failing/32 exe static shared/shlib2.c @@ -0,0 +1,16 @@ +#if defined _WIN32 || defined __CYGWIN__ + #define DLL_PUBLIC __declspec(dllexport) +#else + #if defined __GNUC__ + #define DLL_PUBLIC __attribute__ ((visibility("default"))) + #else + #pragma message ("Compiler does not support symbol visibility.") + #define DLL_PUBLIC + #endif +#endif + +int statlibfunc(void); + +int DLL_PUBLIC shlibfunc2(void) { + return 24; +} diff --git a/meson/test cases/failing/32 exe static shared/stat.c b/meson/test cases/failing/32 exe static shared/stat.c new file mode 100644 index 000000000..56ec66c67 --- /dev/null +++ b/meson/test cases/failing/32 exe static shared/stat.c @@ -0,0 +1,3 @@ +int statlibfunc() { + return 42; +} diff --git a/meson/test cases/failing/32 exe static shared/test.json b/meson/test cases/failing/32 exe static shared/test.json new file mode 100644 index 000000000..51d38046b --- /dev/null +++ b/meson/test cases/failing/32 exe static shared/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/32 exe static shared/meson.build:9:0: ERROR: Can't link non-PIC static library 'stat' into shared library 'shr2'. Use the 'pic' option to static_library to build with PIC." + } + ] +} diff --git a/meson/test cases/failing/33 non-root subproject/meson.build b/meson/test cases/failing/33 non-root subproject/meson.build new file mode 100644 index 000000000..c84dce7f9 --- /dev/null +++ b/meson/test cases/failing/33 non-root subproject/meson.build @@ -0,0 +1,3 @@ +project('non-root subproject', 'c') + +subdir('some') diff --git a/meson/test cases/failing/33 non-root subproject/some/meson.build b/meson/test cases/failing/33 non-root subproject/some/meson.build new file mode 100644 index 000000000..d82f45123 --- /dev/null +++ b/meson/test cases/failing/33 non-root subproject/some/meson.build @@ -0,0 +1 @@ +dependency('definitely-doesnt-exist', fallback : ['someproj', 'some_dep']) diff --git a/meson/test cases/failing/33 non-root subproject/test.json b/meson/test cases/failing/33 non-root subproject/test.json new file mode 100644 index 000000000..52baf6a65 --- /dev/null +++ b/meson/test cases/failing/33 non-root subproject/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/33 non-root subproject/some/meson.build:1:0: ERROR: Neither a subproject directory nor a someproj.wrap file was found." + } + ] +} diff --git a/meson/test cases/failing/34 dependency not-required then required/meson.build b/meson/test cases/failing/34 dependency not-required then required/meson.build new file mode 100644 index 000000000..1796699e4 --- /dev/null +++ b/meson/test cases/failing/34 dependency not-required then required/meson.build @@ -0,0 +1,4 @@ +project('dep-test', 'c', version : '1.0') + +foo_dep = dependency('foo-bar-xyz-12.3', required : false) +bar_dep = dependency('foo-bar-xyz-12.3') diff --git a/meson/test cases/failing/34 dependency not-required then required/test.json b/meson/test cases/failing/34 dependency not-required then required/test.json new file mode 100644 index 000000000..3cf35f5f4 --- /dev/null +++ b/meson/test cases/failing/34 dependency not-required then required/test.json @@ -0,0 +1,8 @@ +{ + "stdout": [ + { + "match": "re", + "line": ".*/meson\\.build:4:0: ERROR: (Pkg-config binary for machine MachineChoice\\.HOST not found\\. Giving up\\.|Dependency \"foo\\-bar\\-xyz\\-12\\.3\" not found, tried .*)" + } + ] +} diff --git a/meson/test cases/failing/35 project argument after target/exe.c b/meson/test cases/failing/35 project argument after target/exe.c new file mode 100644 index 000000000..11b7fad8e --- /dev/null +++ b/meson/test cases/failing/35 project argument after target/exe.c @@ -0,0 +1,3 @@ +int main(int argc, char **argv) { + return 0; +} diff --git a/meson/test cases/failing/35 project argument after target/meson.build b/meson/test cases/failing/35 project argument after target/meson.build new file mode 100644 index 000000000..5402c67fc --- /dev/null +++ b/meson/test cases/failing/35 project argument after target/meson.build @@ -0,0 +1,7 @@ +project('project argument after target failing', 'c', + version : '2.3.4', + license : 'mylicense') + +add_project_arguments('-DPROJECT_OPTION', language: 'c') +e = executable('exe', 'exe.c') +add_project_arguments('-DPROJECT_OPTION1', language: 'c') diff --git a/meson/test cases/failing/35 project argument after target/test.json b/meson/test cases/failing/35 project argument after target/test.json new file mode 100644 index 000000000..f5efd9bd8 --- /dev/null +++ b/meson/test cases/failing/35 project argument after target/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/35 project argument after target/meson.build:7:0: ERROR: Tried to use 'add_project_arguments' after a build target has been declared." + } + ] +} diff --git a/meson/test cases/failing/36 pkgconfig dependency impossible conditions/meson.build b/meson/test cases/failing/36 pkgconfig dependency impossible conditions/meson.build new file mode 100644 index 000000000..874b58177 --- /dev/null +++ b/meson/test cases/failing/36 pkgconfig dependency impossible conditions/meson.build @@ -0,0 +1,7 @@ +project('impossible-dep-test', 'c', version : '1.0') + +if not dependency('zlib', required: false).found() + error('MESON_SKIP_TEST test requires zlib') +endif + +dependency('zlib', version : ['>=1.0', '<1.0']) diff --git a/meson/test cases/failing/36 pkgconfig dependency impossible conditions/test.json b/meson/test cases/failing/36 pkgconfig dependency impossible conditions/test.json new file mode 100644 index 000000000..6deddbe3a --- /dev/null +++ b/meson/test cases/failing/36 pkgconfig dependency impossible conditions/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/36 pkgconfig dependency impossible conditions/meson.build:7:0: ERROR: Dependency 'zlib' is required but not found." + } + ] +} diff --git a/meson/test cases/failing/37 has function external dependency/meson.build b/meson/test cases/failing/37 has function external dependency/meson.build new file mode 100644 index 000000000..45a3bc246 --- /dev/null +++ b/meson/test cases/failing/37 has function external dependency/meson.build @@ -0,0 +1,8 @@ +project('has function ext dep', 'c') + +cc = meson.get_compiler('c') + +mylib = shared_library('mylib', 'mylib.c') +mylib_dep = declare_dependency(link_with : mylib) +# Only external dependencies can work here +cc.has_function('malloc', dependencies : mylib_dep) diff --git a/meson/test cases/failing/37 has function external dependency/mylib.c b/meson/test cases/failing/37 has function external dependency/mylib.c new file mode 100644 index 000000000..d9fbd342b --- /dev/null +++ b/meson/test cases/failing/37 has function external dependency/mylib.c @@ -0,0 +1 @@ +int testfunc(void) { return 0; } diff --git a/meson/test cases/failing/37 has function external dependency/test.json b/meson/test cases/failing/37 has function external dependency/test.json new file mode 100644 index 000000000..81d6f918c --- /dev/null +++ b/meson/test cases/failing/37 has function external dependency/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/37 has function external dependency/meson.build:8:3: ERROR: Dependencies must be external dependencies" + } + ] +} diff --git a/meson/test cases/failing/38 libdir must be inside prefix/meson.build b/meson/test cases/failing/38 libdir must be inside prefix/meson.build new file mode 100644 index 000000000..4cce7f81c --- /dev/null +++ b/meson/test cases/failing/38 libdir must be inside prefix/meson.build @@ -0,0 +1,6 @@ +project('libdir prefix', 'c', + default_options : ['libdir=/opt/lib']) + +if host_machine.system() == 'windows' + error('MESON_SKIP_TEST: this test does not work on Windows since /foo is not absolute') +endif
\ No newline at end of file diff --git a/meson/test cases/failing/38 libdir must be inside prefix/test.json b/meson/test cases/failing/38 libdir must be inside prefix/test.json new file mode 100644 index 000000000..d9256d1a2 --- /dev/null +++ b/meson/test cases/failing/38 libdir must be inside prefix/test.json @@ -0,0 +1,10 @@ +{ + "do_not_set_opts": [ + "libdir" + ], + "stdout": [ + { + "line": "test cases/failing/38 libdir must be inside prefix/meson.build:1:0: ERROR: The value of the 'libdir' option is '/opt/lib' which must be a subdir of the prefix '/usr'." + } + ] +} diff --git a/meson/test cases/failing/39 prefix absolute/meson.build b/meson/test cases/failing/39 prefix absolute/meson.build new file mode 100644 index 000000000..e2863e79c --- /dev/null +++ b/meson/test cases/failing/39 prefix absolute/meson.build @@ -0,0 +1,2 @@ +project('prefix-abs', 'c', + default_options : ['prefix=some/path/notabs']) diff --git a/meson/test cases/failing/39 prefix absolute/test.json b/meson/test cases/failing/39 prefix absolute/test.json new file mode 100644 index 000000000..2770243ee --- /dev/null +++ b/meson/test cases/failing/39 prefix absolute/test.json @@ -0,0 +1,11 @@ +{ + "do_not_set_opts": [ + "prefix" + ], + "stdout": [ + { + "comment": "literal 'some/path/notabs' appears in output, irrespective of os.path.sep, as that's the prefix", + "line": "test cases/failing/39 prefix absolute/meson.build:1:0: ERROR: prefix value 'some/path/notabs' must be an absolute path" + } + ] +} diff --git a/meson/test cases/failing/4 missing meson.build/meson.build b/meson/test cases/failing/4 missing meson.build/meson.build new file mode 100644 index 000000000..18654be2b --- /dev/null +++ b/meson/test cases/failing/4 missing meson.build/meson.build @@ -0,0 +1,3 @@ +project('missing meson.build', 'c') + +subdir('subdir') diff --git a/meson/test cases/failing/4 missing meson.build/subdir/dummy.txt b/meson/test cases/failing/4 missing meson.build/subdir/dummy.txt new file mode 100644 index 000000000..03327bdee --- /dev/null +++ b/meson/test cases/failing/4 missing meson.build/subdir/dummy.txt @@ -0,0 +1 @@ +This needs to be here because Git can't handle empty dirs. diff --git a/meson/test cases/failing/4 missing meson.build/test.json b/meson/test cases/failing/4 missing meson.build/test.json new file mode 100644 index 000000000..3857090b1 --- /dev/null +++ b/meson/test cases/failing/4 missing meson.build/test.json @@ -0,0 +1,9 @@ +{ + "stdout": [ + { + "match": "re", + "comment": "'subdir/meson.build' gets transformed with os.path.sep separators", + "line": "test cases/failing/4 missing meson\\.build/meson\\.build:3:0: ERROR: Non\\-existent build file 'subdir[\\\\/]meson\\.build'" + } + ] +} diff --git a/meson/test cases/failing/40 kwarg assign/dummy.c b/meson/test cases/failing/40 kwarg assign/dummy.c new file mode 100644 index 000000000..16fcdd9f4 --- /dev/null +++ b/meson/test cases/failing/40 kwarg assign/dummy.c @@ -0,0 +1,3 @@ +const char* dummy() { + return "I do nothing."; +} diff --git a/meson/test cases/failing/40 kwarg assign/meson.build b/meson/test cases/failing/40 kwarg assign/meson.build new file mode 100644 index 000000000..c86786fd1 --- /dev/null +++ b/meson/test cases/failing/40 kwarg assign/meson.build @@ -0,0 +1,4 @@ +project('assign in kwarg', 'c') + +executable('prog', 'dummy.c', args = 'prog.c') + diff --git a/meson/test cases/failing/40 kwarg assign/prog.c b/meson/test cases/failing/40 kwarg assign/prog.c new file mode 100644 index 000000000..11b7fad8e --- /dev/null +++ b/meson/test cases/failing/40 kwarg assign/prog.c @@ -0,0 +1,3 @@ +int main(int argc, char **argv) { + return 0; +} diff --git a/meson/test cases/failing/40 kwarg assign/test.json b/meson/test cases/failing/40 kwarg assign/test.json new file mode 100644 index 000000000..671eb3fdb --- /dev/null +++ b/meson/test cases/failing/40 kwarg assign/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/40 kwarg assign/meson.build:3:0: ERROR: Tried to assign values inside an argument list." + } + ] +} diff --git a/meson/test cases/failing/41 custom target plainname many inputs/1.txt b/meson/test cases/failing/41 custom target plainname many inputs/1.txt new file mode 100644 index 000000000..d00491fd7 --- /dev/null +++ b/meson/test cases/failing/41 custom target plainname many inputs/1.txt @@ -0,0 +1 @@ +1 diff --git a/meson/test cases/failing/41 custom target plainname many inputs/2.txt b/meson/test cases/failing/41 custom target plainname many inputs/2.txt new file mode 100644 index 000000000..0cfbf0888 --- /dev/null +++ b/meson/test cases/failing/41 custom target plainname many inputs/2.txt @@ -0,0 +1 @@ +2 diff --git a/meson/test cases/failing/41 custom target plainname many inputs/catfiles.py b/meson/test cases/failing/41 custom target plainname many inputs/catfiles.py new file mode 100644 index 000000000..1c53e24e7 --- /dev/null +++ b/meson/test cases/failing/41 custom target plainname many inputs/catfiles.py @@ -0,0 +1,9 @@ +#!/usr/bin/env python3 + +import sys + +out = sys.argv[-1] +with open(out, 'wb') as o: + for infile in sys.argv[1:-1]: + with open(infile, 'rb') as f: + o.write(f.read()) diff --git a/meson/test cases/failing/41 custom target plainname many inputs/meson.build b/meson/test cases/failing/41 custom target plainname many inputs/meson.build new file mode 100644 index 000000000..1bcfc0672 --- /dev/null +++ b/meson/test cases/failing/41 custom target plainname many inputs/meson.build @@ -0,0 +1,8 @@ +project('plain name many inputs', 'c') + +catfiles = find_program('catfiles.py') + +custom_target('plainname-inputs', + input : ['1.txt', '2.txt'], + output : '@PLAINNAME@.dat', + command : [catfiles, '@INPUT@', '@OUTPUT@']) diff --git a/meson/test cases/failing/41 custom target plainname many inputs/test.json b/meson/test cases/failing/41 custom target plainname many inputs/test.json new file mode 100644 index 000000000..8c15cda5a --- /dev/null +++ b/meson/test cases/failing/41 custom target plainname many inputs/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/41 custom target plainname many inputs/meson.build:5:0: ERROR: Output cannot contain @PLAINNAME@ or @BASENAME@ when there is more than one input (we can't know which to use)" + } + ] +} diff --git a/meson/test cases/failing/42 custom target outputs not matching install_dirs/generator.py b/meson/test cases/failing/42 custom target outputs not matching install_dirs/generator.py new file mode 100755 index 000000000..4ac61795b --- /dev/null +++ b/meson/test cases/failing/42 custom target outputs not matching install_dirs/generator.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python3 + +import sys, os + +if len(sys.argv) != 3: + print(sys.argv[0], '<namespace>', '<output dir>') + +name = sys.argv[1] +odir = sys.argv[2] + +with open(os.path.join(odir, name + '.h'), 'w') as f: + f.write('int func();\n') +with open(os.path.join(odir, name + '.c'), 'w') as f: + f.write('int main(int argc, char *argv[]) { return 0; }') +with open(os.path.join(odir, name + '.sh'), 'w') as f: + f.write('#!/bin/bash') diff --git a/meson/test cases/failing/42 custom target outputs not matching install_dirs/meson.build b/meson/test cases/failing/42 custom target outputs not matching install_dirs/meson.build new file mode 100644 index 000000000..765e23764 --- /dev/null +++ b/meson/test cases/failing/42 custom target outputs not matching install_dirs/meson.build @@ -0,0 +1,13 @@ +project('outputs not matching install_dirs', 'c') + +gen = find_program('generator.py') + +if meson.backend() != 'ninja' + error('MESON_SKIP_TEST test is only for the ninja backend') +endif + +custom_target('too-few-install-dirs', + output : ['toofew.h', 'toofew.c', 'toofew.sh'], + command : [gen, 'toofew', '@OUTDIR@'], + install : true, + install_dir : [join_paths(get_option('prefix'), get_option('includedir')), false]) diff --git a/meson/test cases/failing/42 custom target outputs not matching install_dirs/test.json b/meson/test cases/failing/42 custom target outputs not matching install_dirs/test.json new file mode 100644 index 000000000..f9e2ba781 --- /dev/null +++ b/meson/test cases/failing/42 custom target outputs not matching install_dirs/test.json @@ -0,0 +1,33 @@ +{ + "installed": [ + { + "type": "file", + "file": "usr/include/diff.h" + }, + { + "type": "file", + "file": "usr/include/first.h" + }, + { + "type": "file", + "file": "usr/bin/diff.sh" + }, + { + "type": "file", + "file": "usr/bin/second.sh" + }, + { + "type": "file", + "file": "opt/same.h" + }, + { + "type": "file", + "file": "opt/same.sh" + } + ], + "stdout": [ + { + "line": "ERROR: Target 'too-few-install-dirs' has 3 outputs: ['toofew.h', 'toofew.c', 'toofew.sh'], but only 2 \"install_dir\"s were found." + } + ] +} diff --git a/meson/test cases/failing/43 project name colon/meson.build b/meson/test cases/failing/43 project name colon/meson.build new file mode 100644 index 000000000..53e947ef2 --- /dev/null +++ b/meson/test cases/failing/43 project name colon/meson.build @@ -0,0 +1 @@ +project('name with :') diff --git a/meson/test cases/failing/43 project name colon/test.json b/meson/test cases/failing/43 project name colon/test.json new file mode 100644 index 000000000..7a5557473 --- /dev/null +++ b/meson/test cases/failing/43 project name colon/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/43 project name colon/meson.build:1:0: ERROR: Project name 'name with :' must not contain ':'" + } + ] +} diff --git a/meson/test cases/failing/44 abs subdir/bob/meson.build b/meson/test cases/failing/44 abs subdir/bob/meson.build new file mode 100644 index 000000000..7bbf4b284 --- /dev/null +++ b/meson/test cases/failing/44 abs subdir/bob/meson.build @@ -0,0 +1,2 @@ +# This file is never reached. +x = 3 diff --git a/meson/test cases/failing/44 abs subdir/meson.build b/meson/test cases/failing/44 abs subdir/meson.build new file mode 100644 index 000000000..8c23224a4 --- /dev/null +++ b/meson/test cases/failing/44 abs subdir/meson.build @@ -0,0 +1,6 @@ +project('abs subdir', 'c') + +# For some reason people insist on doing this, probably +# because Make has taught them to never rely on anything. +subdir(join_paths(meson.source_root(), 'bob')) + diff --git a/meson/test cases/failing/44 abs subdir/test.json b/meson/test cases/failing/44 abs subdir/test.json new file mode 100644 index 000000000..0aa56f692 --- /dev/null +++ b/meson/test cases/failing/44 abs subdir/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/44 abs subdir/meson.build:5:0: ERROR: Subdir argument must be a relative path." + } + ] +} diff --git a/meson/test cases/failing/45 abspath to srcdir/meson.build b/meson/test cases/failing/45 abspath to srcdir/meson.build new file mode 100644 index 000000000..964a19b56 --- /dev/null +++ b/meson/test cases/failing/45 abspath to srcdir/meson.build @@ -0,0 +1,3 @@ +project('meson', 'c') + +include_directories(meson.current_source_dir()) diff --git a/meson/test cases/failing/45 abspath to srcdir/test.json b/meson/test cases/failing/45 abspath to srcdir/test.json new file mode 100644 index 000000000..177bac1bc --- /dev/null +++ b/meson/test cases/failing/45 abspath to srcdir/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/45 abspath to srcdir/meson.build:3:0: ERROR: Tried to form an absolute path to a source dir." + } + ] +} diff --git a/meson/test cases/failing/46 pkgconfig variables reserved/meson.build b/meson/test cases/failing/46 pkgconfig variables reserved/meson.build new file mode 100644 index 000000000..82ae995d4 --- /dev/null +++ b/meson/test cases/failing/46 pkgconfig variables reserved/meson.build @@ -0,0 +1,16 @@ +project('variables-reserved-test', 'c', version : '1.0') + +pkgg = import('pkgconfig') +lib = shared_library('simple', 'simple.c') +libver = '1.0' +h = install_headers('simple.h') + +pkgg.generate( + libraries : [lib, '-lz'], + subdirs : '.', + version : libver, + name : 'libsimple', + filebase : 'simple', + description : 'A simple demo library.', + variables : [ 'prefix=/tmp/' ] +) diff --git a/meson/test cases/failing/46 pkgconfig variables reserved/simple.c b/meson/test cases/failing/46 pkgconfig variables reserved/simple.c new file mode 100644 index 000000000..e8a6d8330 --- /dev/null +++ b/meson/test cases/failing/46 pkgconfig variables reserved/simple.c @@ -0,0 +1,5 @@ +#include"simple.h" + +int simple_function() { + return 42; +} diff --git a/meson/test cases/failing/46 pkgconfig variables reserved/simple.h b/meson/test cases/failing/46 pkgconfig variables reserved/simple.h new file mode 100644 index 000000000..bb52e6d72 --- /dev/null +++ b/meson/test cases/failing/46 pkgconfig variables reserved/simple.h @@ -0,0 +1,6 @@ +#ifndef SIMPLE_H_ +#define SIMPLE_H_ + +int simple_function(); + +#endif diff --git a/meson/test cases/failing/46 pkgconfig variables reserved/test.json b/meson/test cases/failing/46 pkgconfig variables reserved/test.json new file mode 100644 index 000000000..b92ee17cd --- /dev/null +++ b/meson/test cases/failing/46 pkgconfig variables reserved/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/46 pkgconfig variables reserved/meson.build:8:5: ERROR: Variable \"prefix\" is reserved" + } + ] +} diff --git a/meson/test cases/failing/47 pkgconfig variables zero length/meson.build b/meson/test cases/failing/47 pkgconfig variables zero length/meson.build new file mode 100644 index 000000000..65d33445c --- /dev/null +++ b/meson/test cases/failing/47 pkgconfig variables zero length/meson.build @@ -0,0 +1,16 @@ +project('variables-zero-length-test', 'c', version : '1.0') + +pkgg = import('pkgconfig') +lib = shared_library('simple', 'simple.c') +libver = '1.0' +h = install_headers('simple.h') + +pkgg.generate( + libraries : [lib, '-lz'], + subdirs : '.', + version : libver, + name : 'libsimple', + filebase : 'simple', + description : 'A simple demo library.', + variables : [ '=value' ] +) diff --git a/meson/test cases/failing/47 pkgconfig variables zero length/simple.c b/meson/test cases/failing/47 pkgconfig variables zero length/simple.c new file mode 100644 index 000000000..e8a6d8330 --- /dev/null +++ b/meson/test cases/failing/47 pkgconfig variables zero length/simple.c @@ -0,0 +1,5 @@ +#include"simple.h" + +int simple_function() { + return 42; +} diff --git a/meson/test cases/failing/47 pkgconfig variables zero length/simple.h b/meson/test cases/failing/47 pkgconfig variables zero length/simple.h new file mode 100644 index 000000000..bb52e6d72 --- /dev/null +++ b/meson/test cases/failing/47 pkgconfig variables zero length/simple.h @@ -0,0 +1,6 @@ +#ifndef SIMPLE_H_ +#define SIMPLE_H_ + +int simple_function(); + +#endif diff --git a/meson/test cases/failing/47 pkgconfig variables zero length/test.json b/meson/test cases/failing/47 pkgconfig variables zero length/test.json new file mode 100644 index 000000000..39ffde4c6 --- /dev/null +++ b/meson/test cases/failing/47 pkgconfig variables zero length/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/47 pkgconfig variables zero length/meson.build:8:5: ERROR: Empty variable name or value" + } + ] +} diff --git a/meson/test cases/failing/48 pkgconfig variables zero length value/meson.build b/meson/test cases/failing/48 pkgconfig variables zero length value/meson.build new file mode 100644 index 000000000..33977b273 --- /dev/null +++ b/meson/test cases/failing/48 pkgconfig variables zero length value/meson.build @@ -0,0 +1,16 @@ +project('variables-zero-length-value-test', 'c', version : '1.0') + +pkgg = import('pkgconfig') +lib = shared_library('simple', 'simple.c') +libver = '1.0' +h = install_headers('simple.h') + +pkgg.generate( + libraries : [lib, '-lz'], + subdirs : '.', + version : libver, + name : 'libsimple', + filebase : 'simple', + description : 'A simple demo library.', + variables : [ 'key=' ] +) diff --git a/meson/test cases/failing/48 pkgconfig variables zero length value/simple.c b/meson/test cases/failing/48 pkgconfig variables zero length value/simple.c new file mode 100644 index 000000000..e8a6d8330 --- /dev/null +++ b/meson/test cases/failing/48 pkgconfig variables zero length value/simple.c @@ -0,0 +1,5 @@ +#include"simple.h" + +int simple_function() { + return 42; +} diff --git a/meson/test cases/failing/48 pkgconfig variables zero length value/simple.h b/meson/test cases/failing/48 pkgconfig variables zero length value/simple.h new file mode 100644 index 000000000..bb52e6d72 --- /dev/null +++ b/meson/test cases/failing/48 pkgconfig variables zero length value/simple.h @@ -0,0 +1,6 @@ +#ifndef SIMPLE_H_ +#define SIMPLE_H_ + +int simple_function(); + +#endif diff --git a/meson/test cases/failing/48 pkgconfig variables zero length value/test.json b/meson/test cases/failing/48 pkgconfig variables zero length value/test.json new file mode 100644 index 000000000..8aa1bc58f --- /dev/null +++ b/meson/test cases/failing/48 pkgconfig variables zero length value/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/48 pkgconfig variables zero length value/meson.build:8:5: ERROR: Empty variable name or value" + } + ] +} diff --git a/meson/test cases/failing/49 pkgconfig variables not key value/meson.build b/meson/test cases/failing/49 pkgconfig variables not key value/meson.build new file mode 100644 index 000000000..02fa7376f --- /dev/null +++ b/meson/test cases/failing/49 pkgconfig variables not key value/meson.build @@ -0,0 +1,16 @@ +project('variables-not-key-value-test', 'c', version : '1.0') + +pkgg = import('pkgconfig') +lib = shared_library('simple', 'simple.c') +libver = '1.0' +h = install_headers('simple.h') + +pkgg.generate( + libraries : [lib, '-lz'], + subdirs : '.', + version : libver, + name : 'libsimple', + filebase : 'simple', + description : 'A simple demo library.', + variables : [ 'this_should_be_key_value' ] +) diff --git a/meson/test cases/failing/49 pkgconfig variables not key value/simple.c b/meson/test cases/failing/49 pkgconfig variables not key value/simple.c new file mode 100644 index 000000000..e8a6d8330 --- /dev/null +++ b/meson/test cases/failing/49 pkgconfig variables not key value/simple.c @@ -0,0 +1,5 @@ +#include"simple.h" + +int simple_function() { + return 42; +} diff --git a/meson/test cases/failing/49 pkgconfig variables not key value/simple.h b/meson/test cases/failing/49 pkgconfig variables not key value/simple.h new file mode 100644 index 000000000..bb52e6d72 --- /dev/null +++ b/meson/test cases/failing/49 pkgconfig variables not key value/simple.h @@ -0,0 +1,6 @@ +#ifndef SIMPLE_H_ +#define SIMPLE_H_ + +int simple_function(); + +#endif diff --git a/meson/test cases/failing/49 pkgconfig variables not key value/test.json b/meson/test cases/failing/49 pkgconfig variables not key value/test.json new file mode 100644 index 000000000..082bd7955 --- /dev/null +++ b/meson/test cases/failing/49 pkgconfig variables not key value/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/49 pkgconfig variables not key value/meson.build:8:5: ERROR: Variable 'this_should_be_key_value' must have a value separated by equals sign." + } + ] +} diff --git a/meson/test cases/failing/5 misplaced option/meson.build b/meson/test cases/failing/5 misplaced option/meson.build new file mode 100644 index 000000000..883de0f02 --- /dev/null +++ b/meson/test cases/failing/5 misplaced option/meson.build @@ -0,0 +1,3 @@ +project('misplaced option', 'c') + +option('dummy', type : 'string') diff --git a/meson/test cases/failing/5 misplaced option/test.json b/meson/test cases/failing/5 misplaced option/test.json new file mode 100644 index 000000000..12afdf025 --- /dev/null +++ b/meson/test cases/failing/5 misplaced option/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/5 misplaced option/meson.build:3:0: ERROR: Tried to call option() in build description file. All options must be in the option file." + } + ] +} diff --git a/meson/test cases/failing/50 executable comparison/meson.build b/meson/test cases/failing/50 executable comparison/meson.build new file mode 100644 index 000000000..041bcf3d3 --- /dev/null +++ b/meson/test cases/failing/50 executable comparison/meson.build @@ -0,0 +1,6 @@ +project('executable comparison', 'c') + +exe1 = executable('prog1', sources : 'prog.c') +exe2 = executable('prog2', sources : 'prog.c') + +assert(exe1 < exe2, 'should fail') diff --git a/meson/test cases/failing/50 executable comparison/prog.c b/meson/test cases/failing/50 executable comparison/prog.c new file mode 100644 index 000000000..0314ff17b --- /dev/null +++ b/meson/test cases/failing/50 executable comparison/prog.c @@ -0,0 +1 @@ +int main(int argc, char **argv) { return 0; } diff --git a/meson/test cases/failing/50 executable comparison/test.json b/meson/test cases/failing/50 executable comparison/test.json new file mode 100644 index 000000000..585b38283 --- /dev/null +++ b/meson/test cases/failing/50 executable comparison/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/50 executable comparison/meson.build:6:0: ERROR: exe1 can only be compared for equality." + } + ] +} diff --git a/meson/test cases/failing/51 inconsistent comparison/meson.build b/meson/test cases/failing/51 inconsistent comparison/meson.build new file mode 100644 index 000000000..7694c2cd2 --- /dev/null +++ b/meson/test cases/failing/51 inconsistent comparison/meson.build @@ -0,0 +1,7 @@ +project('kwarg before arg', 'c') + +# All of these should fail, though only the first one will error out if +# everything's working correctly. +assert([] < 'st', 'should fail') +assert([] < 1, 'should fail') +assert(2 < 'st', 'should fail') diff --git a/meson/test cases/failing/51 inconsistent comparison/test.json b/meson/test cases/failing/51 inconsistent comparison/test.json new file mode 100644 index 000000000..5867f0a05 --- /dev/null +++ b/meson/test cases/failing/51 inconsistent comparison/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/51 inconsistent comparison/meson.build:5:0: ERROR: Values of different types (list, str) cannot be compared using <." + } + ] +} diff --git a/meson/test cases/failing/52 slashname/meson.build b/meson/test cases/failing/52 slashname/meson.build new file mode 100644 index 000000000..bba5301bf --- /dev/null +++ b/meson/test cases/failing/52 slashname/meson.build @@ -0,0 +1,12 @@ +project('slashname', 'c') + +# Traverse this subdir so the corresponding dir +# is created inside the build dir. +subdir('sub') + +# Try to create an executable that would go in the "sub" dir +# inside the build dir. This is prohibited. +executable('sub/prog', pf) + +error('Re-enable me once slash in name is finally prohibited.') + diff --git a/meson/test cases/failing/52 slashname/sub/meson.build b/meson/test cases/failing/52 slashname/sub/meson.build new file mode 100644 index 000000000..e10489001 --- /dev/null +++ b/meson/test cases/failing/52 slashname/sub/meson.build @@ -0,0 +1,2 @@ +pf = files('prog.c') + diff --git a/meson/test cases/failing/52 slashname/sub/prog.c b/meson/test cases/failing/52 slashname/sub/prog.c new file mode 100644 index 000000000..722de0abe --- /dev/null +++ b/meson/test cases/failing/52 slashname/sub/prog.c @@ -0,0 +1,6 @@ +#include<stdio.h> + +int main(int argc, char **argv) { + printf("I should not be run ever.\n"); + return 1; +} diff --git a/meson/test cases/failing/52 slashname/test.json b/meson/test cases/failing/52 slashname/test.json new file mode 100644 index 000000000..180400ae7 --- /dev/null +++ b/meson/test cases/failing/52 slashname/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/52 slashname/meson.build:11:0: ERROR: Problem encountered: Re-enable me once slash in name is finally prohibited." + } + ] +} diff --git a/meson/test cases/failing/53 reserved meson prefix/meson-foo/meson.build b/meson/test cases/failing/53 reserved meson prefix/meson-foo/meson.build new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/meson/test cases/failing/53 reserved meson prefix/meson-foo/meson.build diff --git a/meson/test cases/failing/53 reserved meson prefix/meson.build b/meson/test cases/failing/53 reserved meson prefix/meson.build new file mode 100644 index 000000000..1339035ad --- /dev/null +++ b/meson/test cases/failing/53 reserved meson prefix/meson.build @@ -0,0 +1,3 @@ +project('test') + +subdir('meson-foo') diff --git a/meson/test cases/failing/53 reserved meson prefix/test.json b/meson/test cases/failing/53 reserved meson prefix/test.json new file mode 100644 index 000000000..502d96af9 --- /dev/null +++ b/meson/test cases/failing/53 reserved meson prefix/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/53 reserved meson prefix/meson.build:3:0: ERROR: The \"meson-\" prefix is reserved and cannot be used for top-level subdir()." + } + ] +} diff --git a/meson/test cases/failing/54 wrong shared crate type/foo.rs b/meson/test cases/failing/54 wrong shared crate type/foo.rs new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/meson/test cases/failing/54 wrong shared crate type/foo.rs diff --git a/meson/test cases/failing/54 wrong shared crate type/meson.build b/meson/test cases/failing/54 wrong shared crate type/meson.build new file mode 100644 index 000000000..b9fcad4e5 --- /dev/null +++ b/meson/test cases/failing/54 wrong shared crate type/meson.build @@ -0,0 +1,7 @@ +project('test') + +if not add_languages('rust', required: false) + error('MESON_SKIP_TEST test requires rust compiler') +endif + +shared_library('test', 'foo.rs', rust_crate_type : 'staticlib') diff --git a/meson/test cases/failing/54 wrong shared crate type/test.json b/meson/test cases/failing/54 wrong shared crate type/test.json new file mode 100644 index 000000000..5cced6fad --- /dev/null +++ b/meson/test cases/failing/54 wrong shared crate type/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/54 wrong shared crate type/meson.build:7:0: ERROR: Crate type \"staticlib\" invalid for dynamic libraries; must be \"dylib\" or \"cdylib\"" + } + ] +} diff --git a/meson/test cases/failing/55 wrong static crate type/foo.rs b/meson/test cases/failing/55 wrong static crate type/foo.rs new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/meson/test cases/failing/55 wrong static crate type/foo.rs diff --git a/meson/test cases/failing/55 wrong static crate type/meson.build b/meson/test cases/failing/55 wrong static crate type/meson.build new file mode 100644 index 000000000..109907f96 --- /dev/null +++ b/meson/test cases/failing/55 wrong static crate type/meson.build @@ -0,0 +1,7 @@ +project('test') + +if not add_languages('rust', required: false) + error('MESON_SKIP_TEST test requires rust compiler') +endif + +static_library('test', 'foo.rs', rust_crate_type : 'cdylib') diff --git a/meson/test cases/failing/55 wrong static crate type/test.json b/meson/test cases/failing/55 wrong static crate type/test.json new file mode 100644 index 000000000..7073f7bf0 --- /dev/null +++ b/meson/test cases/failing/55 wrong static crate type/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/55 wrong static crate type/meson.build:7:0: ERROR: Crate type \"cdylib\" invalid for static libraries; must be \"rlib\" or \"staticlib\"" + } + ] +} diff --git a/meson/test cases/failing/56 or on new line/meson.build b/meson/test cases/failing/56 or on new line/meson.build new file mode 100644 index 000000000..12f27058d --- /dev/null +++ b/meson/test cases/failing/56 or on new line/meson.build @@ -0,0 +1,7 @@ +project('silent_or', 'c') + +if get_option('foo') == 'true' + or get_option('foo') == 'auto' +else + message('If this message is printed then something is wrong. The or above should give a syntax error.') +endif diff --git a/meson/test cases/failing/56 or on new line/meson_options.txt b/meson/test cases/failing/56 or on new line/meson_options.txt new file mode 100644 index 000000000..3302cf4ec --- /dev/null +++ b/meson/test cases/failing/56 or on new line/meson_options.txt @@ -0,0 +1 @@ +option('foo', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto') diff --git a/meson/test cases/failing/56 or on new line/test.json b/meson/test cases/failing/56 or on new line/test.json new file mode 100644 index 000000000..c55cee6eb --- /dev/null +++ b/meson/test cases/failing/56 or on new line/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/56 or on new line/meson.build:4:8: ERROR: Invalid or clause." + } + ] +} diff --git a/meson/test cases/failing/57 link with executable/meson.build b/meson/test cases/failing/57 link with executable/meson.build new file mode 100644 index 000000000..186b3e595 --- /dev/null +++ b/meson/test cases/failing/57 link with executable/meson.build @@ -0,0 +1,4 @@ +project('link with exe', 'c') + +e = executable('prog', 'prog.c') +m = shared_module('module', 'module.c', link_with: e) diff --git a/meson/test cases/failing/57 link with executable/module.c b/meson/test cases/failing/57 link with executable/module.c new file mode 100644 index 000000000..dc0124a24 --- /dev/null +++ b/meson/test cases/failing/57 link with executable/module.c @@ -0,0 +1,4 @@ + +int func(void) { + return 42; +} diff --git a/meson/test cases/failing/57 link with executable/prog.c b/meson/test cases/failing/57 link with executable/prog.c new file mode 100644 index 000000000..f3836d7ba --- /dev/null +++ b/meson/test cases/failing/57 link with executable/prog.c @@ -0,0 +1,5 @@ +int +main (int argc, char **argv) +{ + return 0; +} diff --git a/meson/test cases/failing/57 link with executable/test.json b/meson/test cases/failing/57 link with executable/test.json new file mode 100644 index 000000000..c835a9033 --- /dev/null +++ b/meson/test cases/failing/57 link with executable/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/57 link with executable/meson.build:4:0: ERROR: Link target 'prog' is not linkable." + } + ] +} diff --git a/meson/test cases/failing/58 assign custom target index/meson.build b/meson/test cases/failing/58 assign custom target index/meson.build new file mode 100644 index 000000000..7f2a820b8 --- /dev/null +++ b/meson/test cases/failing/58 assign custom target index/meson.build @@ -0,0 +1,24 @@ +# Copyright ยฉ 2017 Intel Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +prog_python = import('python3').find_python() + +target = custom_target( + 'target', + output : ['1', '2'], + command : [prog_python, '-c', + 'with open("1", "w") as f: f.write("foo"); with open("2", "w") as f: f.write("foo")'], +) + +target[0] = 'foo' diff --git a/meson/test cases/failing/58 assign custom target index/test.json b/meson/test cases/failing/58 assign custom target index/test.json new file mode 100644 index 000000000..b5aa3263c --- /dev/null +++ b/meson/test cases/failing/58 assign custom target index/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/58 assign custom target index/meson.build:24:0: ERROR: Assignment target must be an id." + } + ] +} diff --git a/meson/test cases/failing/59 getoption prefix/meson.build b/meson/test cases/failing/59 getoption prefix/meson.build new file mode 100644 index 000000000..8f85cff2a --- /dev/null +++ b/meson/test cases/failing/59 getoption prefix/meson.build @@ -0,0 +1,5 @@ +project('getopt prefix') + +subproject('abc') + +get_option('abc:foo') diff --git a/meson/test cases/failing/59 getoption prefix/subprojects/abc/meson.build b/meson/test cases/failing/59 getoption prefix/subprojects/abc/meson.build new file mode 100644 index 000000000..aa9c3df0f --- /dev/null +++ b/meson/test cases/failing/59 getoption prefix/subprojects/abc/meson.build @@ -0,0 +1 @@ +project('abc', 'c') diff --git a/meson/test cases/failing/59 getoption prefix/subprojects/abc/meson_options.txt b/meson/test cases/failing/59 getoption prefix/subprojects/abc/meson_options.txt new file mode 100644 index 000000000..89e624e24 --- /dev/null +++ b/meson/test cases/failing/59 getoption prefix/subprojects/abc/meson_options.txt @@ -0,0 +1 @@ +option('foo', type : 'boolean') diff --git a/meson/test cases/failing/59 getoption prefix/test.json b/meson/test cases/failing/59 getoption prefix/test.json new file mode 100644 index 000000000..4485e0465 --- /dev/null +++ b/meson/test cases/failing/59 getoption prefix/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/59 getoption prefix/meson.build:5:0: ERROR: Having a colon in option name is forbidden, projects are not allowed to directly access options of other subprojects." + } + ] +} diff --git a/meson/test cases/failing/6 missing incdir/meson.build b/meson/test cases/failing/6 missing incdir/meson.build new file mode 100644 index 000000000..617ee77bb --- /dev/null +++ b/meson/test cases/failing/6 missing incdir/meson.build @@ -0,0 +1,3 @@ +project('missing incdir', 'c') + +inc = include_directories('nosuchdir') diff --git a/meson/test cases/failing/6 missing incdir/test.json b/meson/test cases/failing/6 missing incdir/test.json new file mode 100644 index 000000000..172d8a9e2 --- /dev/null +++ b/meson/test cases/failing/6 missing incdir/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/6 missing incdir/meson.build:3:0: ERROR: Include dir nosuchdir does not exist." + } + ] +} diff --git a/meson/test cases/failing/60 bad option argument/meson.build b/meson/test cases/failing/60 bad option argument/meson.build new file mode 100644 index 000000000..5219cfb96 --- /dev/null +++ b/meson/test cases/failing/60 bad option argument/meson.build @@ -0,0 +1,3 @@ +project('bad option') + +get_option('name') diff --git a/meson/test cases/failing/60 bad option argument/meson_options.txt b/meson/test cases/failing/60 bad option argument/meson_options.txt new file mode 100644 index 000000000..de1fff6fb --- /dev/null +++ b/meson/test cases/failing/60 bad option argument/meson_options.txt @@ -0,0 +1 @@ +option('name', type : 'string', vaule : 'foo') diff --git a/meson/test cases/failing/60 bad option argument/test.json b/meson/test cases/failing/60 bad option argument/test.json new file mode 100644 index 000000000..a2b27483e --- /dev/null +++ b/meson/test cases/failing/60 bad option argument/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/60 bad option argument/meson_options.txt:1:0: ERROR: Invalid kwargs for option \"name\": \"vaule\"" + } + ] +} diff --git a/meson/test cases/failing/61 subproj filegrab/meson.build b/meson/test cases/failing/61 subproj filegrab/meson.build new file mode 100644 index 000000000..f38d6c74c --- /dev/null +++ b/meson/test cases/failing/61 subproj filegrab/meson.build @@ -0,0 +1,5 @@ +project('mainproj', 'c') + +# Try to grab a file from a parent project. + +subproject('a') diff --git a/meson/test cases/failing/61 subproj filegrab/prog.c b/meson/test cases/failing/61 subproj filegrab/prog.c new file mode 100644 index 000000000..0314ff17b --- /dev/null +++ b/meson/test cases/failing/61 subproj filegrab/prog.c @@ -0,0 +1 @@ +int main(int argc, char **argv) { return 0; } diff --git a/meson/test cases/failing/61 subproj filegrab/subprojects/a/meson.build b/meson/test cases/failing/61 subproj filegrab/subprojects/a/meson.build new file mode 100644 index 000000000..80b988804 --- /dev/null +++ b/meson/test cases/failing/61 subproj filegrab/subprojects/a/meson.build @@ -0,0 +1,3 @@ +project('a', 'c') + +executable('prog', '../../prog.c') diff --git a/meson/test cases/failing/61 subproj filegrab/test.json b/meson/test cases/failing/61 subproj filegrab/test.json new file mode 100644 index 000000000..600e0d515 --- /dev/null +++ b/meson/test cases/failing/61 subproj filegrab/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/61 subproj filegrab/subprojects/a/meson.build:3:0: ERROR: Sandbox violation: Tried to grab file prog.c outside current (sub)project." + } + ] +} diff --git a/meson/test cases/failing/62 grab subproj/meson.build b/meson/test cases/failing/62 grab subproj/meson.build new file mode 100644 index 000000000..30fc69093 --- /dev/null +++ b/meson/test cases/failing/62 grab subproj/meson.build @@ -0,0 +1,7 @@ +project('grabber', 'c') + +# Try to grab a file from a child subproject. + +subproject('foo') + +executable('foo', 'subprojects/foo/sub.c') diff --git a/meson/test cases/failing/62 grab subproj/subprojects/foo/meson.build b/meson/test cases/failing/62 grab subproj/subprojects/foo/meson.build new file mode 100644 index 000000000..b346f6d9a --- /dev/null +++ b/meson/test cases/failing/62 grab subproj/subprojects/foo/meson.build @@ -0,0 +1,3 @@ +project('foo', 'c') + +message('I do nothing.') diff --git a/meson/test cases/failing/62 grab subproj/subprojects/foo/sub.c b/meson/test cases/failing/62 grab subproj/subprojects/foo/sub.c new file mode 100644 index 000000000..a94b1f5ad --- /dev/null +++ b/meson/test cases/failing/62 grab subproj/subprojects/foo/sub.c @@ -0,0 +1,6 @@ +#include<stdio.h> + +int main(int argc, char **argv) { + printf("I am a subproject executable file.\n"); + return 0; +} diff --git a/meson/test cases/failing/62 grab subproj/test.json b/meson/test cases/failing/62 grab subproj/test.json new file mode 100644 index 000000000..1503ad7c6 --- /dev/null +++ b/meson/test cases/failing/62 grab subproj/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/62 grab subproj/meson.build:7:0: ERROR: Sandbox violation: Tried to grab file sub.c from a nested subproject." + } + ] +} diff --git a/meson/test cases/failing/63 grab sibling/meson.build b/meson/test cases/failing/63 grab sibling/meson.build new file mode 100644 index 000000000..60b926a95 --- /dev/null +++ b/meson/test cases/failing/63 grab sibling/meson.build @@ -0,0 +1,3 @@ +project('master', 'c') + +subproject('a') diff --git a/meson/test cases/failing/63 grab sibling/subprojects/a/meson.build b/meson/test cases/failing/63 grab sibling/subprojects/a/meson.build new file mode 100644 index 000000000..6dd9f61fc --- /dev/null +++ b/meson/test cases/failing/63 grab sibling/subprojects/a/meson.build @@ -0,0 +1,3 @@ +project('a', 'c') + +executable('sneaky', '../b/sneaky.c') diff --git a/meson/test cases/failing/63 grab sibling/subprojects/b/meson.build b/meson/test cases/failing/63 grab sibling/subprojects/b/meson.build new file mode 100644 index 000000000..7c70fe55b --- /dev/null +++ b/meson/test cases/failing/63 grab sibling/subprojects/b/meson.build @@ -0,0 +1,3 @@ +projecT('b', 'c') + +message('I do nothing.') diff --git a/meson/test cases/failing/63 grab sibling/subprojects/b/sneaky.c b/meson/test cases/failing/63 grab sibling/subprojects/b/sneaky.c new file mode 100644 index 000000000..46718c6cc --- /dev/null +++ b/meson/test cases/failing/63 grab sibling/subprojects/b/sneaky.c @@ -0,0 +1,6 @@ +#include<stdio.h> + +int main(int argc, char **argv) { + printf("I can only come into existence via trickery.\n"); + return 0; +} diff --git a/meson/test cases/failing/63 grab sibling/test.json b/meson/test cases/failing/63 grab sibling/test.json new file mode 100644 index 000000000..91715c7cf --- /dev/null +++ b/meson/test cases/failing/63 grab sibling/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/63 grab sibling/subprojects/a/meson.build:3:0: ERROR: Sandbox violation: Tried to grab file sneaky.c outside current (sub)project." + } + ] +} diff --git a/meson/test cases/failing/64 string as link target/meson.build b/meson/test cases/failing/64 string as link target/meson.build new file mode 100644 index 000000000..cb83fff6a --- /dev/null +++ b/meson/test cases/failing/64 string as link target/meson.build @@ -0,0 +1,2 @@ +project('string as link argument', 'c') +executable('myprog', 'prog.c', link_with: [ '' ]) diff --git a/meson/test cases/failing/64 string as link target/prog.c b/meson/test cases/failing/64 string as link target/prog.c new file mode 100644 index 000000000..0314ff17b --- /dev/null +++ b/meson/test cases/failing/64 string as link target/prog.c @@ -0,0 +1 @@ +int main(int argc, char **argv) { return 0; } diff --git a/meson/test cases/failing/64 string as link target/test.json b/meson/test cases/failing/64 string as link target/test.json new file mode 100644 index 000000000..b07a2ea09 --- /dev/null +++ b/meson/test cases/failing/64 string as link target/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/64 string as link target/meson.build:2:0: ERROR: '' is not a target." + } + ] +} diff --git a/meson/test cases/failing/65 dependency not-found and required/meson.build b/meson/test cases/failing/65 dependency not-found and required/meson.build new file mode 100644 index 000000000..1ce574738 --- /dev/null +++ b/meson/test cases/failing/65 dependency not-found and required/meson.build @@ -0,0 +1,2 @@ +project('dep-test') +dep = dependency('', required:true) diff --git a/meson/test cases/failing/65 dependency not-found and required/test.json b/meson/test cases/failing/65 dependency not-found and required/test.json new file mode 100644 index 000000000..ff2096987 --- /dev/null +++ b/meson/test cases/failing/65 dependency not-found and required/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/65 dependency not-found and required/meson.build:2:0: ERROR: Dependency is required but has no candidates." + } + ] +} diff --git a/meson/test cases/failing/66 subproj different versions/main.c b/meson/test cases/failing/66 subproj different versions/main.c new file mode 100644 index 000000000..8793c623a --- /dev/null +++ b/meson/test cases/failing/66 subproj different versions/main.c @@ -0,0 +1,9 @@ +#include <stdio.h> +#include "a.h" +#include "b.h" + +int main(int argc, char **argv) { + int life = a_fun() + b_fun(); + printf("%d\n", life); + return 0; +} diff --git a/meson/test cases/failing/66 subproj different versions/meson.build b/meson/test cases/failing/66 subproj different versions/meson.build new file mode 100644 index 000000000..e964e423e --- /dev/null +++ b/meson/test cases/failing/66 subproj different versions/meson.build @@ -0,0 +1,9 @@ +project('super', 'c') + +# A will use version 1 of C +a_dep = dependency('a', fallback: ['a', 'a_dep']) + +# B will fail because it requests version 2 of C +b_dep = dependency('b', fallback: ['b', 'b_dep']) + +main = executable('main', files('main.c'), dependencies: [a_dep, b_dep]) diff --git a/meson/test cases/failing/66 subproj different versions/subprojects/a/a.c b/meson/test cases/failing/66 subproj different versions/subprojects/a/a.c new file mode 100644 index 000000000..cd41a6588 --- /dev/null +++ b/meson/test cases/failing/66 subproj different versions/subprojects/a/a.c @@ -0,0 +1,5 @@ +#include "c.h" + +int a_fun() { + return c_fun(); +} diff --git a/meson/test cases/failing/66 subproj different versions/subprojects/a/a.h b/meson/test cases/failing/66 subproj different versions/subprojects/a/a.h new file mode 100644 index 000000000..8f1d49eda --- /dev/null +++ b/meson/test cases/failing/66 subproj different versions/subprojects/a/a.h @@ -0,0 +1 @@ +int a_fun(); diff --git a/meson/test cases/failing/66 subproj different versions/subprojects/a/meson.build b/meson/test cases/failing/66 subproj different versions/subprojects/a/meson.build new file mode 100644 index 000000000..e84182a07 --- /dev/null +++ b/meson/test cases/failing/66 subproj different versions/subprojects/a/meson.build @@ -0,0 +1,11 @@ +project('a', 'c') + +c_dep = dependency('c', version:'1', fallback: ['c', 'c_dep']) + +alib = library('a', 'a.c', + dependencies: c_dep) + +a_dep = declare_dependency( + link_with: alib, + include_directories: include_directories('.'), +) diff --git a/meson/test cases/failing/66 subproj different versions/subprojects/b/b.c b/meson/test cases/failing/66 subproj different versions/subprojects/b/b.c new file mode 100644 index 000000000..f85f8c3f8 --- /dev/null +++ b/meson/test cases/failing/66 subproj different versions/subprojects/b/b.c @@ -0,0 +1,5 @@ +#include "c.h" + +int b_fun(){ +return c_fun(); +} diff --git a/meson/test cases/failing/66 subproj different versions/subprojects/b/b.h b/meson/test cases/failing/66 subproj different versions/subprojects/b/b.h new file mode 100644 index 000000000..eced786a0 --- /dev/null +++ b/meson/test cases/failing/66 subproj different versions/subprojects/b/b.h @@ -0,0 +1 @@ +int b_fun(); diff --git a/meson/test cases/failing/66 subproj different versions/subprojects/b/meson.build b/meson/test cases/failing/66 subproj different versions/subprojects/b/meson.build new file mode 100644 index 000000000..0398340e6 --- /dev/null +++ b/meson/test cases/failing/66 subproj different versions/subprojects/b/meson.build @@ -0,0 +1,11 @@ +project('b', 'c') + +c_dep = dependency('c', version:'2', fallback: ['c', 'c_dep']) + +blib = library('b', 'b.c', + dependencies: c_dep) + +b_dep = declare_dependency( + link_with: blib, + include_directories: include_directories('.'), +) diff --git a/meson/test cases/failing/66 subproj different versions/subprojects/c/c.h b/meson/test cases/failing/66 subproj different versions/subprojects/c/c.h new file mode 100644 index 000000000..2b15f607c --- /dev/null +++ b/meson/test cases/failing/66 subproj different versions/subprojects/c/c.h @@ -0,0 +1,3 @@ +static int c_fun(){ + return 3; +} diff --git a/meson/test cases/failing/66 subproj different versions/subprojects/c/meson.build b/meson/test cases/failing/66 subproj different versions/subprojects/c/meson.build new file mode 100644 index 000000000..7184933b2 --- /dev/null +++ b/meson/test cases/failing/66 subproj different versions/subprojects/c/meson.build @@ -0,0 +1,5 @@ +project('c', 'c', version:'1') + +c_dep = declare_dependency( + include_directories: include_directories('.') +) diff --git a/meson/test cases/failing/66 subproj different versions/test.json b/meson/test cases/failing/66 subproj different versions/test.json new file mode 100644 index 000000000..19e7b4a49 --- /dev/null +++ b/meson/test cases/failing/66 subproj different versions/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/66 subproj different versions/subprojects/b/meson.build:3:0: ERROR: Dependency 'c' is required but not found." + } + ] +} diff --git a/meson/test cases/failing/67 wrong boost module/meson.build b/meson/test cases/failing/67 wrong boost module/meson.build new file mode 100644 index 000000000..937e58749 --- /dev/null +++ b/meson/test cases/failing/67 wrong boost module/meson.build @@ -0,0 +1,9 @@ +project('boosttest', 'cpp', + default_options : ['cpp_std=c++11']) + +if not dependency('boost', required: false).found() + error('MESON_SKIP_TEST test requires boost') +endif + +# abc doesn't exist +linkdep = dependency('boost', modules : ['thread', 'system', 'test', 'abc']) diff --git a/meson/test cases/failing/67 wrong boost module/test.json b/meson/test cases/failing/67 wrong boost module/test.json new file mode 100644 index 000000000..5f9b21fc8 --- /dev/null +++ b/meson/test cases/failing/67 wrong boost module/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/67 wrong boost module/meson.build:9:0: ERROR: Dependency \"boost\" not found, tried system" + } + ] +} diff --git a/meson/test cases/failing/68 install_data rename bad size/file1.txt b/meson/test cases/failing/68 install_data rename bad size/file1.txt new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/meson/test cases/failing/68 install_data rename bad size/file1.txt diff --git a/meson/test cases/failing/68 install_data rename bad size/file2.txt b/meson/test cases/failing/68 install_data rename bad size/file2.txt new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/meson/test cases/failing/68 install_data rename bad size/file2.txt diff --git a/meson/test cases/failing/68 install_data rename bad size/meson.build b/meson/test cases/failing/68 install_data rename bad size/meson.build new file mode 100644 index 000000000..c7cde087d --- /dev/null +++ b/meson/test cases/failing/68 install_data rename bad size/meson.build @@ -0,0 +1,3 @@ +project('data install test', 'c') + +install_data(['file1.txt', 'file2.txt'], rename : 'just one name') diff --git a/meson/test cases/failing/68 install_data rename bad size/test.json b/meson/test cases/failing/68 install_data rename bad size/test.json new file mode 100644 index 000000000..a3cbb1bf4 --- /dev/null +++ b/meson/test cases/failing/68 install_data rename bad size/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/68 install_data rename bad size/meson.build:3:0: ERROR: \"rename\" and \"sources\" argument lists must be the same length if \"rename\" is given. Rename has 1 elements and sources has 2." + } + ] +} diff --git a/meson/test cases/failing/69 skip only subdir/meson.build b/meson/test cases/failing/69 skip only subdir/meson.build new file mode 100644 index 000000000..4832bd49c --- /dev/null +++ b/meson/test cases/failing/69 skip only subdir/meson.build @@ -0,0 +1,8 @@ +# Check that skip_rest only exits subdir, not the whole script. +# Should create an error because main.cpp does not exists. +project('example exit', 'cpp') + +subdir('subdir') + +message('Good') +executable('main', 'main.cpp') diff --git a/meson/test cases/failing/69 skip only subdir/subdir/meson.build b/meson/test cases/failing/69 skip only subdir/subdir/meson.build new file mode 100644 index 000000000..1ba447b22 --- /dev/null +++ b/meson/test cases/failing/69 skip only subdir/subdir/meson.build @@ -0,0 +1,3 @@ +subdir_done() + +error('Unreachable') diff --git a/meson/test cases/failing/69 skip only subdir/test.json b/meson/test cases/failing/69 skip only subdir/test.json new file mode 100644 index 000000000..134971a39 --- /dev/null +++ b/meson/test cases/failing/69 skip only subdir/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/69 skip only subdir/meson.build:8:0: ERROR: File main.cpp does not exist." + } + ] +} diff --git a/meson/test cases/failing/7 go to subproject/meson.build b/meson/test cases/failing/7 go to subproject/meson.build new file mode 100644 index 000000000..205cc5ecf --- /dev/null +++ b/meson/test cases/failing/7 go to subproject/meson.build @@ -0,0 +1,3 @@ +project('fff', 'c') + +subdir('subprojects') diff --git a/meson/test cases/failing/7 go to subproject/subprojects/meson.build b/meson/test cases/failing/7 go to subproject/subprojects/meson.build new file mode 100644 index 000000000..120344f79 --- /dev/null +++ b/meson/test cases/failing/7 go to subproject/subprojects/meson.build @@ -0,0 +1 @@ +x = 'x' diff --git a/meson/test cases/failing/7 go to subproject/test.json b/meson/test cases/failing/7 go to subproject/test.json new file mode 100644 index 000000000..c25475715 --- /dev/null +++ b/meson/test cases/failing/7 go to subproject/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/7 go to subproject/meson.build:3:0: ERROR: Must not go into subprojects dir with subdir(), use subproject() instead." + } + ] +} diff --git a/meson/test cases/failing/70 dual override/meson.build b/meson/test cases/failing/70 dual override/meson.build new file mode 100644 index 000000000..e5f86baaf --- /dev/null +++ b/meson/test cases/failing/70 dual override/meson.build @@ -0,0 +1,5 @@ +project('yo dawg', 'c') + +p = find_program('overrides.py') +meson.override_find_program('override', p) +meson.override_find_program('override', p) diff --git a/meson/test cases/failing/70 dual override/overrides.py b/meson/test cases/failing/70 dual override/overrides.py new file mode 100644 index 000000000..49e9b7ad6 --- /dev/null +++ b/meson/test cases/failing/70 dual override/overrides.py @@ -0,0 +1,4 @@ +#!/usr/bin/env python3 + +print('Yo dawg, we put overrides in your overrides,') +print('so now you can override when you override.') diff --git a/meson/test cases/failing/70 dual override/test.json b/meson/test cases/failing/70 dual override/test.json new file mode 100644 index 000000000..e955dc0fb --- /dev/null +++ b/meson/test cases/failing/70 dual override/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/70 dual override/meson.build:5:6: ERROR: Tried to override executable \"override\" which has already been overridden." + } + ] +} diff --git a/meson/test cases/failing/71 override used/meson.build b/meson/test cases/failing/71 override used/meson.build new file mode 100644 index 000000000..61885bba1 --- /dev/null +++ b/meson/test cases/failing/71 override used/meson.build @@ -0,0 +1,5 @@ +project('overridde an already found exe', 'c') + +old = find_program('something.py') +replacement = find_program('other.py') +meson.override_find_program('something.py', replacement) diff --git a/meson/test cases/failing/71 override used/other.py b/meson/test cases/failing/71 override used/other.py new file mode 100755 index 000000000..f62ba960d --- /dev/null +++ b/meson/test cases/failing/71 override used/other.py @@ -0,0 +1,3 @@ +#!/usr/bin/env python3 + +print('Doing something else.') diff --git a/meson/test cases/failing/71 override used/something.py b/meson/test cases/failing/71 override used/something.py new file mode 100755 index 000000000..64c9454c3 --- /dev/null +++ b/meson/test cases/failing/71 override used/something.py @@ -0,0 +1,3 @@ +#!/usr/bin/env python3 + +print('Doing something.') diff --git a/meson/test cases/failing/71 override used/test.json b/meson/test cases/failing/71 override used/test.json new file mode 100644 index 000000000..6c734e432 --- /dev/null +++ b/meson/test cases/failing/71 override used/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/71 override used/meson.build:5:6: ERROR: Tried to override finding of executable \"something.py\" which has already been found." + } + ] +} diff --git a/meson/test cases/failing/72 run_command unclean exit/meson.build b/meson/test cases/failing/72 run_command unclean exit/meson.build new file mode 100644 index 000000000..4bc02ae7b --- /dev/null +++ b/meson/test cases/failing/72 run_command unclean exit/meson.build @@ -0,0 +1,4 @@ +project('run_command unclean exit', 'c') + +rcprog = find_program('./returncode.py') +run_command(rcprog, '1', check : true) diff --git a/meson/test cases/failing/72 run_command unclean exit/returncode.py b/meson/test cases/failing/72 run_command unclean exit/returncode.py new file mode 100755 index 000000000..84dbc5df6 --- /dev/null +++ b/meson/test cases/failing/72 run_command unclean exit/returncode.py @@ -0,0 +1,4 @@ +#!/usr/bin/env python3 + +import sys +exit(int(sys.argv[1])) diff --git a/meson/test cases/failing/72 run_command unclean exit/test.json b/meson/test cases/failing/72 run_command unclean exit/test.json new file mode 100644 index 000000000..67a80f425 --- /dev/null +++ b/meson/test cases/failing/72 run_command unclean exit/test.json @@ -0,0 +1,8 @@ +{ + "stdout": [ + { + "match": "re", + "line": "test cases/failing/72 run_command unclean exit/meson\\.build:4:0: ERROR: Command \".*[\\\\/]test cases[\\\\/]failing[\\\\/]72 run_command unclean exit[\\\\/]\\.[\\\\/]returncode\\.py 1\" failed with status 1\\." + } + ] +} diff --git a/meson/test cases/failing/73 int literal leading zero/meson.build b/meson/test cases/failing/73 int literal leading zero/meson.build new file mode 100644 index 000000000..7ad64ae09 --- /dev/null +++ b/meson/test cases/failing/73 int literal leading zero/meson.build @@ -0,0 +1,6 @@ + +# This should fail. +# Decimal syntax is 123. +# Octal syntax is 0o123. +fail_0123 = 0123 + diff --git a/meson/test cases/failing/73 int literal leading zero/test.json b/meson/test cases/failing/73 int literal leading zero/test.json new file mode 100644 index 000000000..bc41165d7 --- /dev/null +++ b/meson/test cases/failing/73 int literal leading zero/test.json @@ -0,0 +1,8 @@ +{ + "stdout": [ + { + "comment": "this error message is not very informative", + "line": "test cases/failing/73 int literal leading zero/meson.build:5:13: ERROR: Expecting eof got number." + } + ] +} diff --git a/meson/test cases/failing/74 configuration immutable/input b/meson/test cases/failing/74 configuration immutable/input new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/meson/test cases/failing/74 configuration immutable/input diff --git a/meson/test cases/failing/74 configuration immutable/meson.build b/meson/test cases/failing/74 configuration immutable/meson.build new file mode 100644 index 000000000..b6cac4126 --- /dev/null +++ b/meson/test cases/failing/74 configuration immutable/meson.build @@ -0,0 +1,12 @@ +project('configuration_data is immutable') + +a = configuration_data() + +configure_file( + configuration : a, + input : 'input', + output : 'output', +) + +still_immutable = a +still_immutable.set('hello', 'world') diff --git a/meson/test cases/failing/74 configuration immutable/test.json b/meson/test cases/failing/74 configuration immutable/test.json new file mode 100644 index 000000000..1dd172aec --- /dev/null +++ b/meson/test cases/failing/74 configuration immutable/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/74 configuration immutable/meson.build:12:16: ERROR: Can not set values on configuration object that has been used." + } + ] +} diff --git a/meson/test cases/failing/75 link with shared module on osx/meson.build b/meson/test cases/failing/75 link with shared module on osx/meson.build new file mode 100644 index 000000000..bf18b3626 --- /dev/null +++ b/meson/test cases/failing/75 link with shared module on osx/meson.build @@ -0,0 +1,8 @@ +project('link with shared module', 'c') + +if host_machine.system() != 'darwin' + error('MESON_SKIP_TEST test only fails on OSX') +endif + +m = shared_module('mymodule', 'module.c') +e = executable('prog', 'prog.c', link_with : m) diff --git a/meson/test cases/failing/75 link with shared module on osx/module.c b/meson/test cases/failing/75 link with shared module on osx/module.c new file mode 100644 index 000000000..81b0d5af0 --- /dev/null +++ b/meson/test cases/failing/75 link with shared module on osx/module.c @@ -0,0 +1,3 @@ +int func(void) { + return 1496; +} diff --git a/meson/test cases/failing/75 link with shared module on osx/prog.c b/meson/test cases/failing/75 link with shared module on osx/prog.c new file mode 100644 index 000000000..8164d8da1 --- /dev/null +++ b/meson/test cases/failing/75 link with shared module on osx/prog.c @@ -0,0 +1,4 @@ + +int main(int argc, char **argv) { + return func(); +} diff --git a/meson/test cases/failing/75 link with shared module on osx/test.json b/meson/test cases/failing/75 link with shared module on osx/test.json new file mode 100644 index 000000000..7db17d8d7 --- /dev/null +++ b/meson/test cases/failing/75 link with shared module on osx/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/75 link with shared module on osx/meson.build:8:0: ERROR: target links against shared modules. This is not permitted on OSX" + } + ] +} diff --git a/meson/test cases/failing/76 non ascii in ascii encoded configure file/config9.h.in b/meson/test cases/failing/76 non ascii in ascii encoded configure file/config9.h.in new file mode 100644 index 000000000..323bec64a --- /dev/null +++ b/meson/test cases/failing/76 non ascii in ascii encoded configure file/config9.h.in @@ -0,0 +1 @@ +#define MESSAGE "@var@" diff --git a/meson/test cases/failing/76 non ascii in ascii encoded configure file/meson.build b/meson/test cases/failing/76 non ascii in ascii encoded configure file/meson.build new file mode 100644 index 000000000..846daaf89 --- /dev/null +++ b/meson/test cases/failing/76 non ascii in ascii encoded configure file/meson.build @@ -0,0 +1,10 @@ +project('non acsii to ascii encoding', 'c') +# Writing a non ASCII character with a ASCII encoding should fail +conf9 = configuration_data() +conf9.set('var', 'ะด') +configure_file( + input : 'config9.h.in', + output : '@BASENAME@', + encoding : 'ascii', + configuration : conf9 +) diff --git a/meson/test cases/failing/76 non ascii in ascii encoded configure file/test.json b/meson/test cases/failing/76 non ascii in ascii encoded configure file/test.json new file mode 100644 index 000000000..44e6377a7 --- /dev/null +++ b/meson/test cases/failing/76 non ascii in ascii encoded configure file/test.json @@ -0,0 +1,8 @@ +{ + "stdout": [ + { + "match": "re", + "line": "test cases/failing/76 non ascii in ascii encoded configure file/meson\\.build:5:0: ERROR: Could not write output file .*[\\\\/]config9\\.h: 'ascii' codec can't encode character '\\\\u0434' in position 17: ordinal not in range\\(128\\)" + } + ] +} diff --git a/meson/test cases/failing/77 subproj dependency not-found and required/meson.build b/meson/test cases/failing/77 subproj dependency not-found and required/meson.build new file mode 100644 index 000000000..c5a296104 --- /dev/null +++ b/meson/test cases/failing/77 subproj dependency not-found and required/meson.build @@ -0,0 +1,2 @@ +project('dep-test') +missing = dependency('', fallback: ['missing', 'missing_dep'], required: true) diff --git a/meson/test cases/failing/77 subproj dependency not-found and required/test.json b/meson/test cases/failing/77 subproj dependency not-found and required/test.json new file mode 100644 index 000000000..5365f34e5 --- /dev/null +++ b/meson/test cases/failing/77 subproj dependency not-found and required/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/77 subproj dependency not-found and required/meson.build:2:0: ERROR: Neither a subproject directory nor a missing.wrap file was found." + } + ] +} diff --git a/meson/test cases/failing/78 unfound run/meson.build b/meson/test cases/failing/78 unfound run/meson.build new file mode 100644 index 000000000..3f37e9a06 --- /dev/null +++ b/meson/test cases/failing/78 unfound run/meson.build @@ -0,0 +1,4 @@ +project('unfound runtarget') + +exe = find_program('nonexisting_prog', required : false) +run_target('invoke_fail', command : [exe]) diff --git a/meson/test cases/failing/78 unfound run/test.json b/meson/test cases/failing/78 unfound run/test.json new file mode 100644 index 000000000..0cdcdf209 --- /dev/null +++ b/meson/test cases/failing/78 unfound run/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/78 unfound run/meson.build:4:0: ERROR: Tried to use non-existing executable 'nonexisting_prog'" + } + ] +} diff --git a/meson/test cases/failing/79 framework dependency with version/meson.build b/meson/test cases/failing/79 framework dependency with version/meson.build new file mode 100644 index 000000000..b7e04bab4 --- /dev/null +++ b/meson/test cases/failing/79 framework dependency with version/meson.build @@ -0,0 +1,8 @@ +project('framework dependency with version', 'c') + +if host_machine.system() != 'darwin' + error('MESON_SKIP_TEST test only applicable on darwin') +endif + +# do individual frameworks have a meaningful version to test? And multiple frameworks might be listed... +dep = dependency('appleframeworks', modules: 'foundation', version: '>0') diff --git a/meson/test cases/failing/79 framework dependency with version/test.json b/meson/test cases/failing/79 framework dependency with version/test.json new file mode 100644 index 000000000..9b0d335d7 --- /dev/null +++ b/meson/test cases/failing/79 framework dependency with version/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/79 framework dependency with version/meson.build:8:0: ERROR: Unknown version of dependency 'appleframeworks', but need ['>0']." + } + ] +} diff --git a/meson/test cases/failing/8 recursive/meson.build b/meson/test cases/failing/8 recursive/meson.build new file mode 100644 index 000000000..f3152946d --- /dev/null +++ b/meson/test cases/failing/8 recursive/meson.build @@ -0,0 +1,3 @@ +project('recursive', 'c') + +a = subproject('a') diff --git a/meson/test cases/failing/8 recursive/subprojects/a/meson.build b/meson/test cases/failing/8 recursive/subprojects/a/meson.build new file mode 100644 index 000000000..7c6040bc6 --- /dev/null +++ b/meson/test cases/failing/8 recursive/subprojects/a/meson.build @@ -0,0 +1,3 @@ +project('a', 'c') + +b = subproject('b') diff --git a/meson/test cases/failing/8 recursive/subprojects/b/meson.build b/meson/test cases/failing/8 recursive/subprojects/b/meson.build new file mode 100644 index 000000000..d0beeb7d9 --- /dev/null +++ b/meson/test cases/failing/8 recursive/subprojects/b/meson.build @@ -0,0 +1,3 @@ +project('b', 'c') + +a = subproject('a') diff --git a/meson/test cases/failing/8 recursive/test.json b/meson/test cases/failing/8 recursive/test.json new file mode 100644 index 000000000..b4c964c0f --- /dev/null +++ b/meson/test cases/failing/8 recursive/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/8 recursive/subprojects/b/meson.build:3:0: ERROR: Recursive include of subprojects: a => b => a." + } + ] +} diff --git a/meson/test cases/failing/80 override exe config/foo.c b/meson/test cases/failing/80 override exe config/foo.c new file mode 100644 index 000000000..03b2213bb --- /dev/null +++ b/meson/test cases/failing/80 override exe config/foo.c @@ -0,0 +1,3 @@ +int main(void) { + return 0; +} diff --git a/meson/test cases/failing/80 override exe config/meson.build b/meson/test cases/failing/80 override exe config/meson.build new file mode 100644 index 000000000..29a74166b --- /dev/null +++ b/meson/test cases/failing/80 override exe config/meson.build @@ -0,0 +1,6 @@ +project('myexe', 'c') + +foo = executable('foo', 'foo.c') +meson.override_find_program('bar', foo) +bar = find_program('bar') +run_command(bar) diff --git a/meson/test cases/failing/80 override exe config/test.json b/meson/test cases/failing/80 override exe config/test.json new file mode 100644 index 000000000..36c789e9d --- /dev/null +++ b/meson/test cases/failing/80 override exe config/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/80 override exe config/meson.build:6:0: ERROR: Program 'bar' was overridden with the compiled executable 'foo' and therefore cannot be used during configuration" + } + ] +} diff --git a/meson/test cases/failing/81 gl dependency with version/meson.build b/meson/test cases/failing/81 gl dependency with version/meson.build new file mode 100644 index 000000000..012709302 --- /dev/null +++ b/meson/test cases/failing/81 gl dependency with version/meson.build @@ -0,0 +1,9 @@ +project('gl dependency with version', 'c') + +host_system = host_machine.system() +if host_system != 'windows' and host_system != 'darwin' + error('MESON_SKIP_TEST: test only fails on Windows and OSX') +endif + +# gl dependency found via system method doesn't have a meaningful version to check +dep = dependency('gl', method: 'system', version: '>0') diff --git a/meson/test cases/failing/81 gl dependency with version/test.json b/meson/test cases/failing/81 gl dependency with version/test.json new file mode 100644 index 000000000..86da7359f --- /dev/null +++ b/meson/test cases/failing/81 gl dependency with version/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/81 gl dependency with version/meson.build:9:0: ERROR: Unknown version of dependency 'gl', but need ['>0']." + } + ] +} diff --git a/meson/test cases/failing/82 threads dependency with version/meson.build b/meson/test cases/failing/82 threads dependency with version/meson.build new file mode 100644 index 000000000..6023faeb6 --- /dev/null +++ b/meson/test cases/failing/82 threads dependency with version/meson.build @@ -0,0 +1,3 @@ +project('threads dependency with version', 'c') +# threads dependency doesn't have a meaningful version to check +dep = dependency('threads', version: '>0') diff --git a/meson/test cases/failing/82 threads dependency with version/test.json b/meson/test cases/failing/82 threads dependency with version/test.json new file mode 100644 index 000000000..9b71468ea --- /dev/null +++ b/meson/test cases/failing/82 threads dependency with version/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/82 threads dependency with version/meson.build:3:0: ERROR: Unknown version of dependency 'threads', but need ['>0']." + } + ] +} diff --git a/meson/test cases/failing/83 gtest dependency with version/meson.build b/meson/test cases/failing/83 gtest dependency with version/meson.build new file mode 100644 index 000000000..b43a04733 --- /dev/null +++ b/meson/test cases/failing/83 gtest dependency with version/meson.build @@ -0,0 +1,8 @@ +project('gtest dependency with version', ['c', 'cpp']) + +if not dependency('gtest', method: 'system', required: false).found() + error('MESON_SKIP_TEST test requires gtest') +endif + +# discovering gtest version is not yet implemented +dep = dependency('gtest', method: 'system', version: '>0') diff --git a/meson/test cases/failing/83 gtest dependency with version/test.json b/meson/test cases/failing/83 gtest dependency with version/test.json new file mode 100644 index 000000000..4a44077e2 --- /dev/null +++ b/meson/test cases/failing/83 gtest dependency with version/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/83 gtest dependency with version/meson.build:8:0: ERROR: Dependency 'gtest' is required but not found." + } + ] +} diff --git a/meson/test cases/failing/84 dub libray/meson.build b/meson/test cases/failing/84 dub libray/meson.build new file mode 100644 index 000000000..306d5b3e5 --- /dev/null +++ b/meson/test cases/failing/84 dub libray/meson.build @@ -0,0 +1,11 @@ +project('dub') + +if not add_languages('d', required: false) + error('MESON_SKIP_TEST test requires D compiler') +endif + +if not find_program('dub', required: false).found() + error('MESON_SKIP_TEST test requires dub') +endif + +dependency('dubtestproject', method: 'dub') # Not library (none) diff --git a/meson/test cases/failing/84 dub libray/test.json b/meson/test cases/failing/84 dub libray/test.json new file mode 100644 index 000000000..23fe6e5f6 --- /dev/null +++ b/meson/test cases/failing/84 dub libray/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/84 dub libray/meson.build:11:0: ERROR: Dependency \"dubtestproject\" not found" + } + ] +} diff --git a/meson/test cases/failing/85 dub executable/meson.build b/meson/test cases/failing/85 dub executable/meson.build new file mode 100644 index 000000000..9a134ea21 --- /dev/null +++ b/meson/test cases/failing/85 dub executable/meson.build @@ -0,0 +1,11 @@ +project('dub') + +if not add_languages('d', required: false) + error('MESON_SKIP_TEST test requires D compiler') +endif + +if not find_program('dub', required: false).found() + error('MESON_SKIP_TEST test requires dub') +endif + +dependency('dubtestproject:test1', method: 'dub') # Not library (executable) diff --git a/meson/test cases/failing/85 dub executable/test.json b/meson/test cases/failing/85 dub executable/test.json new file mode 100644 index 000000000..4a8674c34 --- /dev/null +++ b/meson/test cases/failing/85 dub executable/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/85 dub executable/meson.build:11:0: ERROR: Dependency \"dubtestproject:test1\" not found" + } + ] +} diff --git a/meson/test cases/failing/86 dub compiler/meson.build b/meson/test cases/failing/86 dub compiler/meson.build new file mode 100644 index 000000000..36f1849e5 --- /dev/null +++ b/meson/test cases/failing/86 dub compiler/meson.build @@ -0,0 +1,17 @@ +project('dub') + +if not add_languages('d', required: false) + error('MESON_SKIP_TEST test requires D compiler') +endif + +if meson.get_compiler('d').get_id() == 'dmd' + if host_machine.system() == 'windows' or host_machine.system() == 'cygwin' + error('MESON_SKIP_TEST Windows test environment lacks multiple D compilers.') + endif +endif + +if not find_program('dub', required: false).found() + error('MESON_SKIP_TEST test requires dub') +endif + +dependency('dubtestproject:test2', method: 'dub') # Compiler mismatch diff --git a/meson/test cases/failing/86 dub compiler/test.json b/meson/test cases/failing/86 dub compiler/test.json new file mode 100644 index 000000000..ab6caff40 --- /dev/null +++ b/meson/test cases/failing/86 dub compiler/test.json @@ -0,0 +1,19 @@ +{ + "matrix": { + "options": { + "warning_level": [ + { + "val": "1", + "skip_on_env": [ + "SINGLE_DUB_COMPILER" + ] + } + ] + } + }, + "stdout": [ + { + "line": "test cases/failing/86 dub compiler/meson.build:17:0: ERROR: Dependency \"dubtestproject:test2\" not found" + } + ] +} diff --git a/meson/test cases/failing/87 subproj not-found dep/meson.build b/meson/test cases/failing/87 subproj not-found dep/meson.build new file mode 100644 index 000000000..2b17df17e --- /dev/null +++ b/meson/test cases/failing/87 subproj not-found dep/meson.build @@ -0,0 +1,2 @@ +project('dep-test') +missing = dependency('', fallback: ['somesubproj', 'notfound_dep'], required: true) diff --git a/meson/test cases/failing/87 subproj not-found dep/subprojects/somesubproj/meson.build b/meson/test cases/failing/87 subproj not-found dep/subprojects/somesubproj/meson.build new file mode 100644 index 000000000..5f451f401 --- /dev/null +++ b/meson/test cases/failing/87 subproj not-found dep/subprojects/somesubproj/meson.build @@ -0,0 +1,3 @@ +project('dep', 'c') + +notfound_dep = dependency('', required : false) diff --git a/meson/test cases/failing/87 subproj not-found dep/test.json b/meson/test cases/failing/87 subproj not-found dep/test.json new file mode 100644 index 000000000..160e9d351 --- /dev/null +++ b/meson/test cases/failing/87 subproj not-found dep/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/87 subproj not-found dep/meson.build:2:0: ERROR: Dependency '(anonymous)' is required but not found." + } + ] +} diff --git a/meson/test cases/failing/88 invalid configure file/input b/meson/test cases/failing/88 invalid configure file/input new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/meson/test cases/failing/88 invalid configure file/input diff --git a/meson/test cases/failing/88 invalid configure file/meson.build b/meson/test cases/failing/88 invalid configure file/meson.build new file mode 100644 index 000000000..08eca2bd0 --- /dev/null +++ b/meson/test cases/failing/88 invalid configure file/meson.build @@ -0,0 +1,9 @@ +project('invalid configura file') + +configure_file( + configuration : configuration_data(), + input : 'input', + output : 'output', + install_dir : '', + install : true, +) diff --git a/meson/test cases/failing/88 invalid configure file/test.json b/meson/test cases/failing/88 invalid configure file/test.json new file mode 100644 index 000000000..b551f61ae --- /dev/null +++ b/meson/test cases/failing/88 invalid configure file/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/88 invalid configure file/meson.build:3:0: ERROR: \"install_dir\" must be specified when \"install\" in a configure_file is true" + } + ] +} diff --git a/meson/test cases/failing/89 kwarg dupe/meson.build b/meson/test cases/failing/89 kwarg dupe/meson.build new file mode 100644 index 000000000..06821a278 --- /dev/null +++ b/meson/test cases/failing/89 kwarg dupe/meson.build @@ -0,0 +1,6 @@ +project('dupe kwarg', 'c') + +dupedict = {'install': true} + +executable('prog', 'prog.c', install: true, + kwargs: dupedict) diff --git a/meson/test cases/failing/89 kwarg dupe/prog.c b/meson/test cases/failing/89 kwarg dupe/prog.c new file mode 100644 index 000000000..5f3fbe6a2 --- /dev/null +++ b/meson/test cases/failing/89 kwarg dupe/prog.c @@ -0,0 +1,6 @@ +#include<stdio.h> + +int main(int argc, char **argv) { + printf("I don't get built. It makes me saaaaaad. :(\n"); + return 0; +} diff --git a/meson/test cases/failing/89 kwarg dupe/test.json b/meson/test cases/failing/89 kwarg dupe/test.json new file mode 100644 index 000000000..ec4660043 --- /dev/null +++ b/meson/test cases/failing/89 kwarg dupe/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/89 kwarg dupe/meson.build:5:0: ERROR: Entry \"install\" defined both as a keyword argument and in a \"kwarg\" entry." + } + ] +} diff --git a/meson/test cases/failing/9 missing extra file/meson.build b/meson/test cases/failing/9 missing extra file/meson.build new file mode 100644 index 000000000..725bec8f7 --- /dev/null +++ b/meson/test cases/failing/9 missing extra file/meson.build @@ -0,0 +1,3 @@ +project('missing extra file', 'c') + +executable('myprog', 'prog.c', extra_files : 'missing.txt') diff --git a/meson/test cases/failing/9 missing extra file/prog.c b/meson/test cases/failing/9 missing extra file/prog.c new file mode 100644 index 000000000..11b7fad8e --- /dev/null +++ b/meson/test cases/failing/9 missing extra file/prog.c @@ -0,0 +1,3 @@ +int main(int argc, char **argv) { + return 0; +} diff --git a/meson/test cases/failing/9 missing extra file/test.json b/meson/test cases/failing/9 missing extra file/test.json new file mode 100644 index 000000000..188b6a605 --- /dev/null +++ b/meson/test cases/failing/9 missing extra file/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/9 missing extra file/meson.build:3:0: ERROR: File missing.txt does not exist." + } + ] +} diff --git a/meson/test cases/failing/90 missing pch file/meson.build b/meson/test cases/failing/90 missing pch file/meson.build new file mode 100644 index 000000000..a67b79877 --- /dev/null +++ b/meson/test cases/failing/90 missing pch file/meson.build @@ -0,0 +1,3 @@ +project('pch test', 'c') +exe = executable('prog', 'prog.c', +c_pch : ['pch/prog_pch.c', 'pch/prog.h']) diff --git a/meson/test cases/failing/90 missing pch file/prog.c b/meson/test cases/failing/90 missing pch file/prog.c new file mode 100644 index 000000000..11b7fad8e --- /dev/null +++ b/meson/test cases/failing/90 missing pch file/prog.c @@ -0,0 +1,3 @@ +int main(int argc, char **argv) { + return 0; +} diff --git a/meson/test cases/failing/90 missing pch file/test.json b/meson/test cases/failing/90 missing pch file/test.json new file mode 100644 index 000000000..f55eb4785 --- /dev/null +++ b/meson/test cases/failing/90 missing pch file/test.json @@ -0,0 +1,8 @@ +{ + "stdout": [ + { + "comment": "literal 'pch/prog.h' from meson.build appears in output, irrespective of os.path.sep", + "line": "test cases/failing/90 missing pch file/meson.build:2:0: ERROR: File pch/prog.h does not exist." + } + ] +} diff --git a/meson/test cases/failing/91 pch source different folder/include/pch.h b/meson/test cases/failing/91 pch source different folder/include/pch.h new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/meson/test cases/failing/91 pch source different folder/include/pch.h diff --git a/meson/test cases/failing/91 pch source different folder/meson.build b/meson/test cases/failing/91 pch source different folder/meson.build new file mode 100644 index 000000000..d32071772 --- /dev/null +++ b/meson/test cases/failing/91 pch source different folder/meson.build @@ -0,0 +1,5 @@ +project('pch', 'c') +# It is not allowed to have the PCH implementation in a different +# folder than the header. +exe = executable('prog', 'prog.c', + c_pch : ['include/pch.h', 'src/pch.c']) diff --git a/meson/test cases/failing/91 pch source different folder/prog.c b/meson/test cases/failing/91 pch source different folder/prog.c new file mode 100644 index 000000000..3fb1295e4 --- /dev/null +++ b/meson/test cases/failing/91 pch source different folder/prog.c @@ -0,0 +1 @@ +int main(void) {}
\ No newline at end of file diff --git a/meson/test cases/failing/91 pch source different folder/src/pch.c b/meson/test cases/failing/91 pch source different folder/src/pch.c new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/meson/test cases/failing/91 pch source different folder/src/pch.c diff --git a/meson/test cases/failing/91 pch source different folder/test.json b/meson/test cases/failing/91 pch source different folder/test.json new file mode 100644 index 000000000..6309f6c66 --- /dev/null +++ b/meson/test cases/failing/91 pch source different folder/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/91 pch source different folder/meson.build:4:0: ERROR: PCH files must be stored in the same folder." + } + ] +} diff --git a/meson/test cases/failing/92 unknown config tool/meson.build b/meson/test cases/failing/92 unknown config tool/meson.build new file mode 100644 index 000000000..536976e35 --- /dev/null +++ b/meson/test cases/failing/92 unknown config tool/meson.build @@ -0,0 +1,2 @@ +project('no-such-config-tool') +dependency('no-such-config-tool', method:'config-tool') diff --git a/meson/test cases/failing/92 unknown config tool/test.json b/meson/test cases/failing/92 unknown config tool/test.json new file mode 100644 index 000000000..c4484f322 --- /dev/null +++ b/meson/test cases/failing/92 unknown config tool/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/92 unknown config tool/meson.build:2:0: ERROR: Dependency \"no-such-config-tool\" not found" + } + ] +} diff --git a/meson/test cases/failing/93 custom target install data/Info.plist.cpp b/meson/test cases/failing/93 custom target install data/Info.plist.cpp new file mode 100644 index 000000000..9ca2fcbaf --- /dev/null +++ b/meson/test cases/failing/93 custom target install data/Info.plist.cpp @@ -0,0 +1 @@ +Some data which gets processed before installation diff --git a/meson/test cases/failing/93 custom target install data/meson.build b/meson/test cases/failing/93 custom target install data/meson.build new file mode 100644 index 000000000..00d348cc0 --- /dev/null +++ b/meson/test cases/failing/93 custom target install data/meson.build @@ -0,0 +1,11 @@ +project('custom target install data') + +preproc = find_program('preproc.py') + +t = custom_target('Info.plist', + command: [preproc, '@INPUT@', '@OUTPUT@'], + input: 'Info.plist.cpp', + output: 'Info.plist', +) + +install_data(t) diff --git a/meson/test cases/failing/93 custom target install data/preproc.py b/meson/test cases/failing/93 custom target install data/preproc.py new file mode 100644 index 000000000..e6eba4c6a --- /dev/null +++ b/meson/test cases/failing/93 custom target install data/preproc.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python3 + +import sys + +if len(sys.argv) != 3: + print(sys.argv[0], '<input>', '<output>') + +inf = sys.argv[1] +outf = sys.argv[2] + +with open(outf, 'wb') as o: + with open(inf, 'rb') as i: + o.write(i.read()) diff --git a/meson/test cases/failing/93 custom target install data/test.json b/meson/test cases/failing/93 custom target install data/test.json new file mode 100644 index 000000000..caeafb159 --- /dev/null +++ b/meson/test cases/failing/93 custom target install data/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/93 custom target install data/meson.build:11:0: ERROR: install_data argument 1 was of type \"CustomTarget\" but should have been one of: \"str\", \"File\"" + } + ] +} diff --git a/meson/test cases/failing/94 add dict non string key/meson.build b/meson/test cases/failing/94 add dict non string key/meson.build new file mode 100644 index 000000000..c81a3f764 --- /dev/null +++ b/meson/test cases/failing/94 add dict non string key/meson.build @@ -0,0 +1,9 @@ +project('add dictionary entry using non-string key') + +dict = {} + +# An integer variable to be used as a key +key = 1 + +# Add new entry using integer variable as key should fail +dict += {key : 'myValue'}
\ No newline at end of file diff --git a/meson/test cases/failing/94 add dict non string key/test.json b/meson/test cases/failing/94 add dict non string key/test.json new file mode 100644 index 000000000..09459dd0c --- /dev/null +++ b/meson/test cases/failing/94 add dict non string key/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/94 add dict non string key/meson.build:9:0: ERROR: Key must be a string" + } + ] +} diff --git a/meson/test cases/failing/95 add dict duplicate keys/meson.build b/meson/test cases/failing/95 add dict duplicate keys/meson.build new file mode 100644 index 000000000..7a9b523b0 --- /dev/null +++ b/meson/test cases/failing/95 add dict duplicate keys/meson.build @@ -0,0 +1,9 @@ +project('add dictionary entries with duplicate keys') + +dict = {} + +# A variable to be used as a key +key = 'myKey' + +# Add two entries with duplicate keys should fail +dict += {key : 'myValue1', key : 'myValue2'}
\ No newline at end of file diff --git a/meson/test cases/failing/95 add dict duplicate keys/test.json b/meson/test cases/failing/95 add dict duplicate keys/test.json new file mode 100644 index 000000000..ae9a81f34 --- /dev/null +++ b/meson/test cases/failing/95 add dict duplicate keys/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/95 add dict duplicate keys/meson.build:9:0: ERROR: Duplicate dictionary key: myKey" + } + ] +} diff --git a/meson/test cases/failing/96 no host get_external_property/meson.build b/meson/test cases/failing/96 no host get_external_property/meson.build new file mode 100644 index 000000000..c9567549f --- /dev/null +++ b/meson/test cases/failing/96 no host get_external_property/meson.build @@ -0,0 +1,3 @@ +project('missing property') + +message(meson.get_external_property('nonexisting')) diff --git a/meson/test cases/failing/96 no host get_external_property/test.json b/meson/test cases/failing/96 no host get_external_property/test.json new file mode 100644 index 000000000..3376a0b63 --- /dev/null +++ b/meson/test cases/failing/96 no host get_external_property/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/96 no host get_external_property/meson.build:3:0: ERROR: Unknown property for host machine: nonexisting" + } + ] +} diff --git a/meson/test cases/failing/97 no native compiler/main.c b/meson/test cases/failing/97 no native compiler/main.c new file mode 100644 index 000000000..9b6bdc2ec --- /dev/null +++ b/meson/test cases/failing/97 no native compiler/main.c @@ -0,0 +1,3 @@ +int main(void) { + return 0; +} diff --git a/meson/test cases/failing/97 no native compiler/meson.build b/meson/test cases/failing/97 no native compiler/meson.build new file mode 100644 index 000000000..f0126ac15 --- /dev/null +++ b/meson/test cases/failing/97 no native compiler/meson.build @@ -0,0 +1,12 @@ +project('no native compiler') + +if not meson.is_cross_build() + error('MESON_SKIP_TEST test only applicable when cross building.') +endif + +if add_languages('c', required: false, native: true) + error('MESON_SKIP_TEST test only applicable when native compiler not available.') +endif + +add_languages('c') +executable('main', 'main.c', native: true) diff --git a/meson/test cases/failing/97 no native compiler/test.json b/meson/test cases/failing/97 no native compiler/test.json new file mode 100644 index 000000000..b79bd3b8e --- /dev/null +++ b/meson/test cases/failing/97 no native compiler/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/97 no native compiler/meson.build:12:0: ERROR: No host machine compiler for \"main.c\"" + } + ] +} diff --git a/meson/test cases/failing/98 subdir parse error/meson.build b/meson/test cases/failing/98 subdir parse error/meson.build new file mode 100644 index 000000000..ee5bb0cb7 --- /dev/null +++ b/meson/test cases/failing/98 subdir parse error/meson.build @@ -0,0 +1,2 @@ +project('subdir false plusassign', 'c') +subdir('subdir') diff --git a/meson/test cases/failing/98 subdir parse error/subdir/meson.build b/meson/test cases/failing/98 subdir parse error/subdir/meson.build new file mode 100644 index 000000000..3ac5ef938 --- /dev/null +++ b/meson/test cases/failing/98 subdir parse error/subdir/meson.build @@ -0,0 +1 @@ +3 += 4 diff --git a/meson/test cases/failing/98 subdir parse error/test.json b/meson/test cases/failing/98 subdir parse error/test.json new file mode 100644 index 000000000..8e0479990 --- /dev/null +++ b/meson/test cases/failing/98 subdir parse error/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/98 subdir parse error/subdir/meson.build:1:0: ERROR: Plusassignment target must be an id." + } + ] +} diff --git a/meson/test cases/failing/99 invalid option file/meson.build b/meson/test cases/failing/99 invalid option file/meson.build new file mode 100644 index 000000000..b0347c33f --- /dev/null +++ b/meson/test cases/failing/99 invalid option file/meson.build @@ -0,0 +1 @@ +project('invalid option file') diff --git a/meson/test cases/failing/99 invalid option file/meson_options.txt b/meson/test cases/failing/99 invalid option file/meson_options.txt new file mode 100644 index 000000000..eef843b53 --- /dev/null +++ b/meson/test cases/failing/99 invalid option file/meson_options.txt @@ -0,0 +1 @@ +' diff --git a/meson/test cases/failing/99 invalid option file/test.json b/meson/test cases/failing/99 invalid option file/test.json new file mode 100644 index 000000000..ebfddd894 --- /dev/null +++ b/meson/test cases/failing/99 invalid option file/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/99 invalid option file/meson_options.txt:1:0: ERROR: lexer" + } + ] +} |