summaryrefslogtreecommitdiffstats
path: root/test cases/failing
diff options
context:
space:
mode:
Diffstat (limited to 'test cases/failing')
-rw-r--r--test cases/failing/1 project not first/meson.build4
-rw-r--r--test cases/failing/1 project not first/prog.c1
-rw-r--r--test cases/failing/1 project not first/test.json7
-rw-r--r--test cases/failing/10 out of bounds/meson.build4
-rw-r--r--test cases/failing/10 out of bounds/test.json7
-rw-r--r--test cases/failing/100 no glib-compile-resources/meson.build8
-rw-r--r--test cases/failing/100 no glib-compile-resources/test.json7
-rw-r--r--test cases/failing/100 no glib-compile-resources/trivial.gresource.xml3
-rw-r--r--test cases/failing/101 number in combo/meson.build1
-rw-r--r--test cases/failing/101 number in combo/nativefile.ini2
-rw-r--r--test cases/failing/101 number in combo/test.json5
-rw-r--r--test cases/failing/102 bool in combo/meson.build1
-rw-r--r--test cases/failing/102 bool in combo/meson_options.txt5
-rw-r--r--test cases/failing/102 bool in combo/nativefile.ini2
-rw-r--r--test cases/failing/102 bool in combo/test.json5
-rw-r--r--test cases/failing/103 compiler no lang/meson.build2
-rw-r--r--test cases/failing/103 compiler no lang/test.json7
-rw-r--r--test cases/failing/104 no fallback/meson.build2
-rw-r--r--test cases/failing/104 no fallback/subprojects/foob/meson.build2
-rw-r--r--test cases/failing/104 no fallback/test.json8
-rw-r--r--test cases/failing/105 feature require/meson.build2
-rw-r--r--test cases/failing/105 feature require/meson_options.txt1
-rw-r--r--test cases/failing/105 feature require/test.json8
-rw-r--r--test cases/failing/106 feature require.bis/meson.build2
-rw-r--r--test cases/failing/106 feature require.bis/meson_options.txt1
-rw-r--r--test cases/failing/106 feature require.bis/test.json8
-rw-r--r--test cases/failing/107 no build get_external_property/meson.build3
-rw-r--r--test cases/failing/107 no build get_external_property/test.json7
-rw-r--r--test cases/failing/108 enter subdir twice/meson.build3
-rw-r--r--test cases/failing/108 enter subdir twice/sub/meson.build1
-rw-r--r--test cases/failing/108 enter subdir twice/test.json7
-rw-r--r--test cases/failing/109 invalid fstring/109 invalid fstring/meson.build4
-rw-r--r--test cases/failing/109 invalid fstring/109 invalid fstring/test.json7
-rw-r--r--test cases/failing/109 invalid fstring/meson.build3
-rw-r--r--test cases/failing/109 invalid fstring/test.json7
-rw-r--r--test cases/failing/11 object arithmetic/meson.build3
-rw-r--r--test cases/failing/11 object arithmetic/test.json8
-rw-r--r--test cases/failing/110 compiler argument checking/meson.build4
-rw-r--r--test cases/failing/110 compiler argument checking/test.json7
-rw-r--r--test cases/failing/111 empty fallback/meson.build6
-rw-r--r--test cases/failing/111 empty fallback/subprojects/foo/meson.build3
-rw-r--r--test cases/failing/111 empty fallback/test.json8
-rw-r--r--test cases/failing/112 cmake executable dependency/meson.build9
-rw-r--r--test cases/failing/112 cmake executable dependency/subprojects/cmlib/CMakeLists.txt5
-rw-r--r--test cases/failing/112 cmake executable dependency/subprojects/cmlib/main.c3
-rw-r--r--test cases/failing/112 cmake executable dependency/test.json10
-rw-r--r--test cases/failing/113 allow_fallback with fallback/meson.build3
-rw-r--r--test cases/failing/113 allow_fallback with fallback/test.json8
-rw-r--r--test cases/failing/114 nonsensical bindgen/meson.build20
-rw-r--r--test cases/failing/114 nonsensical bindgen/src/header.h8
-rw-r--r--test cases/failing/114 nonsensical bindgen/src/source.c8
-rw-r--r--test cases/failing/114 nonsensical bindgen/test.json8
-rw-r--r--test cases/failing/115 run_target in test/meson.build7
-rw-r--r--test cases/failing/115 run_target in test/test.json8
-rw-r--r--test cases/failing/115 run_target in test/trivial.c6
-rw-r--r--test cases/failing/116 run_target in add_install_script/meson.build7
-rw-r--r--test cases/failing/116 run_target in add_install_script/test.json8
-rw-r--r--test cases/failing/116 run_target in add_install_script/trivial.c11
-rw-r--r--test cases/failing/117 pathsep in install_symlink/meson.build3
-rw-r--r--test cases/failing/117 pathsep in install_symlink/test.json7
-rw-r--r--test cases/failing/118 subproject version conflict/meson.build4
-rw-r--r--test cases/failing/118 subproject version conflict/subprojects/A/meson.build4
-rw-r--r--test cases/failing/118 subproject version conflict/subprojects/B/meson.build3
-rw-r--r--test cases/failing/118 subproject version conflict/test.json7
-rw-r--r--test cases/failing/119 structured source empty string/main.rs0
-rw-r--r--test cases/failing/119 structured source empty string/meson.build13
-rw-r--r--test cases/failing/119 structured source empty string/test.json7
-rw-r--r--test cases/failing/12 string arithmetic/meson.build3
-rw-r--r--test cases/failing/12 string arithmetic/test.json7
-rw-r--r--test cases/failing/120 structured_sources conflicts/main.rs0
-rw-r--r--test cases/failing/120 structured_sources conflicts/meson.build17
-rw-r--r--test cases/failing/120 structured_sources conflicts/test.json7
-rw-r--r--test cases/failing/121 missing compiler/meson.build3
-rw-r--r--test cases/failing/121 missing compiler/subprojects/sub/main.c1
-rw-r--r--test cases/failing/121 missing compiler/subprojects/sub/meson.build4
-rw-r--r--test cases/failing/121 missing compiler/test.json7
-rw-r--r--test cases/failing/122 cmake subproject error/meson.build8
-rw-r--r--test cases/failing/122 cmake subproject error/subprojects/cmlib/CMakeLists.txt5
-rw-r--r--test cases/failing/122 cmake subproject error/test.json10
-rw-r--r--test cases/failing/123 pkgconfig not relocatable outside prefix/meson.build22
-rw-r--r--test cases/failing/123 pkgconfig not relocatable outside prefix/test.json8
-rw-r--r--test cases/failing/124 subproject sandbox violation/meson.build34
-rw-r--r--test cases/failing/124 subproject sandbox violation/meson_options.txt1
-rw-r--r--test cases/failing/124 subproject sandbox violation/subprojects/subproj1/file.txt0
-rw-r--r--test cases/failing/124 subproject sandbox violation/subprojects/subproj1/meson.build4
-rw-r--r--test cases/failing/124 subproject sandbox violation/subprojects/subproj1/nested/meson.build5
-rw-r--r--test cases/failing/124 subproject sandbox violation/subprojects/subproj2/file.txt0
-rw-r--r--test cases/failing/124 subproject sandbox violation/subprojects/subproj2/meson.build7
-rw-r--r--test cases/failing/124 subproject sandbox violation/subprojects/subproj2/nested/meson.build0
-rw-r--r--test cases/failing/124 subproject sandbox violation/subprojects/subproj3/file.txt0
-rw-r--r--test cases/failing/124 subproject sandbox violation/subprojects/subproj3/meson.build3
-rw-r--r--test cases/failing/124 subproject sandbox violation/test.json16
-rw-r--r--test cases/failing/125 override and add_project_dependency/inc/lib.h2
-rw-r--r--test cases/failing/125 override and add_project_dependency/lib.c3
-rw-r--r--test cases/failing/125 override and add_project_dependency/meson.build8
-rw-r--r--test cases/failing/125 override and add_project_dependency/subprojects/a/meson.build10
-rw-r--r--test cases/failing/125 override and add_project_dependency/subprojects/a/prog.c6
-rw-r--r--test cases/failing/125 override and add_project_dependency/test.json7
-rw-r--r--test cases/failing/126 targets before add_project_dependency/inc/lib.h2
-rw-r--r--test cases/failing/126 targets before add_project_dependency/lib.c3
-rw-r--r--test cases/failing/126 targets before add_project_dependency/meson.build5
-rw-r--r--test cases/failing/126 targets before add_project_dependency/test.json7
-rw-r--r--test cases/failing/127 extract from unity/meson.build4
-rw-r--r--test cases/failing/127 extract from unity/src1.c3
-rw-r--r--test cases/failing/127 extract from unity/src2.c3
-rw-r--r--test cases/failing/127 extract from unity/test.json7
-rw-r--r--test cases/failing/128 subproject object as a dependency/main.c1
-rw-r--r--test cases/failing/128 subproject object as a dependency/meson.build4
-rw-r--r--test cases/failing/128 subproject object as a dependency/subprojects/sub/meson.build1
-rw-r--r--test cases/failing/128 subproject object as a dependency/test.json7
-rw-r--r--test cases/failing/129 generator host binary/exe.c1
-rw-r--r--test cases/failing/129 generator host binary/lib.in1
-rw-r--r--test cases/failing/129 generator host binary/meson.build14
-rw-r--r--test cases/failing/129 generator host binary/test.json5
-rw-r--r--test cases/failing/13 array arithmetic/meson.build3
-rw-r--r--test cases/failing/13 array arithmetic/test.json7
-rw-r--r--test cases/failing/14 invalid option name/meson.build1
-rw-r--r--test cases/failing/14 invalid option name/meson_options.txt1
-rw-r--r--test cases/failing/14 invalid option name/test.json7
-rw-r--r--test cases/failing/15 kwarg before arg/meson.build3
-rw-r--r--test cases/failing/15 kwarg before arg/prog.c1
-rw-r--r--test cases/failing/15 kwarg before arg/test.json7
-rw-r--r--test cases/failing/16 extract from subproject/main.c5
-rw-r--r--test cases/failing/16 extract from subproject/meson.build9
-rw-r--r--test cases/failing/16 extract from subproject/subprojects/sub_project/meson.build3
-rw-r--r--test cases/failing/16 extract from subproject/subprojects/sub_project/sub_lib.c3
-rw-r--r--test cases/failing/16 extract from subproject/test.json7
-rw-r--r--test cases/failing/17 same target/file.c1
-rw-r--r--test cases/failing/17 same target/meson.build4
-rw-r--r--test cases/failing/17 same target/test.json7
-rw-r--r--test cases/failing/18 wrong plusassign/meson.build3
-rw-r--r--test cases/failing/18 wrong plusassign/test.json7
-rw-r--r--test cases/failing/19 target clash/clash.c6
-rw-r--r--test cases/failing/19 target clash/meson.build15
-rw-r--r--test cases/failing/19 target clash/test.json7
-rw-r--r--test cases/failing/2 missing file/meson.build3
-rw-r--r--test cases/failing/2 missing file/test.json7
-rw-r--r--test cases/failing/20 version/meson.build1
-rw-r--r--test cases/failing/20 version/test.json8
-rw-r--r--test cases/failing/21 subver/meson.build3
-rw-r--r--test cases/failing/21 subver/subprojects/foo/meson.build1
-rw-r--r--test cases/failing/21 subver/test.json7
-rw-r--r--test cases/failing/22 assert/meson.build3
-rw-r--r--test cases/failing/22 assert/test.json7
-rw-r--r--test cases/failing/23 rel testdir/meson.build4
-rw-r--r--test cases/failing/23 rel testdir/simple.c3
-rw-r--r--test cases/failing/23 rel testdir/test.json7
-rw-r--r--test cases/failing/24 int conversion/meson.build3
-rw-r--r--test cases/failing/24 int conversion/test.json7
-rw-r--r--test cases/failing/25 badlang/meson.build3
-rw-r--r--test cases/failing/25 badlang/test.json7
-rw-r--r--test cases/failing/26 output subdir/foo.in1
-rw-r--r--test cases/failing/26 output subdir/meson.build5
-rw-r--r--test cases/failing/26 output subdir/subdir/dummy.txt1
-rw-r--r--test cases/failing/26 output subdir/test.json7
-rw-r--r--test cases/failing/27 noprog use/meson.build9
-rw-r--r--test cases/failing/27 noprog use/test.json7
-rw-r--r--test cases/failing/28 no crossprop/meson.build3
-rw-r--r--test cases/failing/28 no crossprop/test.json7
-rw-r--r--test cases/failing/29 nested ternary/meson.build3
-rw-r--r--test cases/failing/29 nested ternary/test.json7
-rw-r--r--test cases/failing/3 missing subdir/meson.build3
-rw-r--r--test cases/failing/3 missing subdir/test.json9
-rw-r--r--test cases/failing/30 invalid man extension/foo.a10
-rw-r--r--test cases/failing/30 invalid man extension/meson.build2
-rw-r--r--test cases/failing/30 invalid man extension/test.json7
-rw-r--r--test cases/failing/31 no man extension/foo0
-rw-r--r--test cases/failing/31 no man extension/meson.build2
-rw-r--r--test cases/failing/31 no man extension/test.json7
-rw-r--r--test cases/failing/32 exe static shared/meson.build11
-rw-r--r--test cases/failing/32 exe static shared/prog.c10
-rw-r--r--test cases/failing/32 exe static shared/shlib2.c16
-rw-r--r--test cases/failing/32 exe static shared/stat.c3
-rw-r--r--test cases/failing/32 exe static shared/test.json7
-rw-r--r--test cases/failing/33 non-root subproject/meson.build3
-rw-r--r--test cases/failing/33 non-root subproject/some/meson.build1
-rw-r--r--test cases/failing/33 non-root subproject/test.json7
-rw-r--r--test cases/failing/34 dependency not-required then required/meson.build4
-rw-r--r--test cases/failing/34 dependency not-required then required/test.json8
-rw-r--r--test cases/failing/35 project argument after target/exe.c3
-rw-r--r--test cases/failing/35 project argument after target/meson.build7
-rw-r--r--test cases/failing/35 project argument after target/test.json7
-rw-r--r--test cases/failing/36 pkgconfig dependency impossible conditions/meson.build7
-rw-r--r--test cases/failing/36 pkgconfig dependency impossible conditions/test.json7
-rw-r--r--test cases/failing/37 has function external dependency/meson.build8
-rw-r--r--test cases/failing/37 has function external dependency/mylib.c1
-rw-r--r--test cases/failing/37 has function external dependency/test.json7
-rw-r--r--test cases/failing/38 prefix absolute/meson.build2
-rw-r--r--test cases/failing/38 prefix absolute/test.json11
-rw-r--r--test cases/failing/39 kwarg assign/dummy.c3
-rw-r--r--test cases/failing/39 kwarg assign/meson.build3
-rw-r--r--test cases/failing/39 kwarg assign/prog.c3
-rw-r--r--test cases/failing/39 kwarg assign/test.json7
-rw-r--r--test cases/failing/4 missing meson.build/meson.build3
-rw-r--r--test cases/failing/4 missing meson.build/subdir/dummy.txt1
-rw-r--r--test cases/failing/4 missing meson.build/test.json9
-rw-r--r--test cases/failing/40 custom target plainname many inputs/1.txt1
-rw-r--r--test cases/failing/40 custom target plainname many inputs/2.txt1
-rw-r--r--test cases/failing/40 custom target plainname many inputs/catfiles.py9
-rw-r--r--test cases/failing/40 custom target plainname many inputs/meson.build8
-rw-r--r--test cases/failing/40 custom target plainname many inputs/test.json7
-rwxr-xr-xtest cases/failing/41 custom target outputs not matching install_dirs/generator.py16
-rw-r--r--test cases/failing/41 custom target outputs not matching install_dirs/meson.build13
-rw-r--r--test cases/failing/41 custom target outputs not matching install_dirs/test.json33
-rw-r--r--test cases/failing/42 project name colon/meson.build1
-rw-r--r--test cases/failing/42 project name colon/test.json7
-rw-r--r--test cases/failing/43 abs subdir/bob/meson.build2
-rw-r--r--test cases/failing/43 abs subdir/meson.build5
-rw-r--r--test cases/failing/43 abs subdir/test.json7
-rw-r--r--test cases/failing/44 abspath to srcdir/meson.build3
-rw-r--r--test cases/failing/44 abspath to srcdir/test.json7
-rw-r--r--test cases/failing/45 pkgconfig variables reserved/meson.build16
-rw-r--r--test cases/failing/45 pkgconfig variables reserved/simple.c5
-rw-r--r--test cases/failing/45 pkgconfig variables reserved/simple.h6
-rw-r--r--test cases/failing/45 pkgconfig variables reserved/test.json7
-rw-r--r--test cases/failing/46 pkgconfig variables zero length/meson.build16
-rw-r--r--test cases/failing/46 pkgconfig variables zero length/simple.c5
-rw-r--r--test cases/failing/46 pkgconfig variables zero length/simple.h6
-rw-r--r--test cases/failing/46 pkgconfig variables zero length/test.json7
-rw-r--r--test cases/failing/47 pkgconfig variables zero length value/meson.build16
-rw-r--r--test cases/failing/47 pkgconfig variables zero length value/simple.c5
-rw-r--r--test cases/failing/47 pkgconfig variables zero length value/simple.h6
-rw-r--r--test cases/failing/47 pkgconfig variables zero length value/test.json7
-rw-r--r--test cases/failing/48 pkgconfig variables not key value/meson.build16
-rw-r--r--test cases/failing/48 pkgconfig variables not key value/simple.c5
-rw-r--r--test cases/failing/48 pkgconfig variables not key value/simple.h6
-rw-r--r--test cases/failing/48 pkgconfig variables not key value/test.json7
-rw-r--r--test cases/failing/49 executable comparison/meson.build6
-rw-r--r--test cases/failing/49 executable comparison/prog.c1
-rw-r--r--test cases/failing/49 executable comparison/test.json8
-rw-r--r--test cases/failing/5 misplaced option/meson.build3
-rw-r--r--test cases/failing/5 misplaced option/test.json7
-rw-r--r--test cases/failing/50 inconsistent comparison/meson.build7
-rw-r--r--test cases/failing/50 inconsistent comparison/test.json7
-rw-r--r--test cases/failing/51 slashname/meson.build11
-rw-r--r--test cases/failing/51 slashname/sub/meson.build1
-rw-r--r--test cases/failing/51 slashname/sub/prog.c6
-rw-r--r--test cases/failing/51 slashname/test.json7
-rw-r--r--test cases/failing/52 reserved meson prefix/meson-foo/meson.build0
-rw-r--r--test cases/failing/52 reserved meson prefix/meson.build3
-rw-r--r--test cases/failing/52 reserved meson prefix/test.json7
-rw-r--r--test cases/failing/53 wrong shared crate type/foo.rs0
-rw-r--r--test cases/failing/53 wrong shared crate type/meson.build7
-rw-r--r--test cases/failing/53 wrong shared crate type/test.json7
-rw-r--r--test cases/failing/54 wrong static crate type/foo.rs0
-rw-r--r--test cases/failing/54 wrong static crate type/meson.build7
-rw-r--r--test cases/failing/54 wrong static crate type/test.json7
-rw-r--r--test cases/failing/55 or on new line/meson.build7
-rw-r--r--test cases/failing/55 or on new line/meson_options.txt1
-rw-r--r--test cases/failing/55 or on new line/test.json7
-rw-r--r--test cases/failing/56 link with executable/meson.build4
-rw-r--r--test cases/failing/56 link with executable/module.c4
-rw-r--r--test cases/failing/56 link with executable/prog.c5
-rw-r--r--test cases/failing/56 link with executable/test.json7
-rw-r--r--test cases/failing/57 assign custom target index/meson.build24
-rw-r--r--test cases/failing/57 assign custom target index/test.json7
-rw-r--r--test cases/failing/58 getoption prefix/meson.build5
-rw-r--r--test cases/failing/58 getoption prefix/subprojects/abc/meson.build1
-rw-r--r--test cases/failing/58 getoption prefix/subprojects/abc/meson_options.txt1
-rw-r--r--test cases/failing/58 getoption prefix/test.json7
-rw-r--r--test cases/failing/59 bad option argument/meson.build3
-rw-r--r--test cases/failing/59 bad option argument/meson_options.txt1
-rw-r--r--test cases/failing/59 bad option argument/test.json7
-rw-r--r--test cases/failing/6 missing incdir/meson.build3
-rw-r--r--test cases/failing/6 missing incdir/test.json7
-rw-r--r--test cases/failing/60 subproj filegrab/meson.build5
-rw-r--r--test cases/failing/60 subproj filegrab/prog.c1
-rw-r--r--test cases/failing/60 subproj filegrab/subprojects/a/meson.build3
-rw-r--r--test cases/failing/60 subproj filegrab/test.json7
-rw-r--r--test cases/failing/61 grab subproj/meson.build7
-rw-r--r--test cases/failing/61 grab subproj/subprojects/foo/meson.build3
-rw-r--r--test cases/failing/61 grab subproj/subprojects/foo/sub.c6
-rw-r--r--test cases/failing/61 grab subproj/test.json7
-rw-r--r--test cases/failing/62 grab sibling/meson.build3
-rw-r--r--test cases/failing/62 grab sibling/subprojects/a/meson.build3
-rw-r--r--test cases/failing/62 grab sibling/subprojects/b/meson.build3
-rw-r--r--test cases/failing/62 grab sibling/subprojects/b/sneaky.c6
-rw-r--r--test cases/failing/62 grab sibling/test.json7
-rw-r--r--test cases/failing/63 string as link target/meson.build2
-rw-r--r--test cases/failing/63 string as link target/prog.c1
-rw-r--r--test cases/failing/63 string as link target/test.json7
-rw-r--r--test cases/failing/64 dependency not-found and required/meson.build2
-rw-r--r--test cases/failing/64 dependency not-found and required/test.json7
-rw-r--r--test cases/failing/65 subproj different versions/main.c9
-rw-r--r--test cases/failing/65 subproj different versions/meson.build9
-rw-r--r--test cases/failing/65 subproj different versions/subprojects/a/a.c5
-rw-r--r--test cases/failing/65 subproj different versions/subprojects/a/a.h1
-rw-r--r--test cases/failing/65 subproj different versions/subprojects/a/meson.build11
-rw-r--r--test cases/failing/65 subproj different versions/subprojects/b/b.c5
-rw-r--r--test cases/failing/65 subproj different versions/subprojects/b/b.h1
-rw-r--r--test cases/failing/65 subproj different versions/subprojects/b/meson.build11
-rw-r--r--test cases/failing/65 subproj different versions/subprojects/c/c.h3
-rw-r--r--test cases/failing/65 subproj different versions/subprojects/c/meson.build5
-rw-r--r--test cases/failing/65 subproj different versions/test.json7
-rw-r--r--test cases/failing/66 wrong boost module/meson.build9
-rw-r--r--test cases/failing/66 wrong boost module/test.json7
-rw-r--r--test cases/failing/67 install_data rename bad size/file1.txt0
-rw-r--r--test cases/failing/67 install_data rename bad size/file2.txt0
-rw-r--r--test cases/failing/67 install_data rename bad size/meson.build3
-rw-r--r--test cases/failing/67 install_data rename bad size/test.json7
-rw-r--r--test cases/failing/68 skip only subdir/meson.build8
-rw-r--r--test cases/failing/68 skip only subdir/subdir/meson.build3
-rw-r--r--test cases/failing/68 skip only subdir/test.json7
-rw-r--r--test cases/failing/69 dual override/meson.build5
-rw-r--r--test cases/failing/69 dual override/overrides.py4
-rw-r--r--test cases/failing/69 dual override/test.json7
-rw-r--r--test cases/failing/7 go to subproject/meson.build3
-rw-r--r--test cases/failing/7 go to subproject/subprojects/meson.build1
-rw-r--r--test cases/failing/7 go to subproject/test.json7
-rw-r--r--test cases/failing/70 override used/meson.build5
-rwxr-xr-xtest cases/failing/70 override used/other.py3
-rwxr-xr-xtest cases/failing/70 override used/something.py3
-rw-r--r--test cases/failing/70 override used/test.json7
-rw-r--r--test cases/failing/71 run_command unclean exit/meson.build4
-rwxr-xr-xtest cases/failing/71 run_command unclean exit/returncode.py4
-rw-r--r--test cases/failing/71 run_command unclean exit/test.json8
-rw-r--r--test cases/failing/72 int literal leading zero/meson.build5
-rw-r--r--test cases/failing/72 int literal leading zero/test.json8
-rw-r--r--test cases/failing/73 configuration immutable/input0
-rw-r--r--test cases/failing/73 configuration immutable/meson.build12
-rw-r--r--test cases/failing/73 configuration immutable/test.json7
-rw-r--r--test cases/failing/74 link with shared module on osx/meson.build8
-rw-r--r--test cases/failing/74 link with shared module on osx/module.c3
-rw-r--r--test cases/failing/74 link with shared module on osx/prog.c4
-rw-r--r--test cases/failing/74 link with shared module on osx/test.json7
-rw-r--r--test cases/failing/75 non ascii in ascii encoded configure file/config9.h.in1
-rw-r--r--test cases/failing/75 non ascii in ascii encoded configure file/meson.build10
-rw-r--r--test cases/failing/75 non ascii in ascii encoded configure file/test.json8
-rw-r--r--test cases/failing/76 subproj dependency not-found and required/meson.build2
-rw-r--r--test cases/failing/76 subproj dependency not-found and required/test.json7
-rw-r--r--test cases/failing/77 unfound run/meson.build4
-rw-r--r--test cases/failing/77 unfound run/test.json7
-rw-r--r--test cases/failing/78 framework dependency with version/meson.build8
-rw-r--r--test cases/failing/78 framework dependency with version/test.json7
-rw-r--r--test cases/failing/79 override exe config/foo.c3
-rw-r--r--test cases/failing/79 override exe config/meson.build6
-rw-r--r--test cases/failing/79 override exe config/test.json7
-rw-r--r--test cases/failing/8 recursive/meson.build3
-rw-r--r--test cases/failing/8 recursive/subprojects/a/meson.build3
-rw-r--r--test cases/failing/8 recursive/subprojects/b/meson.build3
-rw-r--r--test cases/failing/8 recursive/test.json7
-rw-r--r--test cases/failing/80 gl dependency with version/meson.build9
-rw-r--r--test cases/failing/80 gl dependency with version/test.json7
-rw-r--r--test cases/failing/81 threads dependency with version/meson.build3
-rw-r--r--test cases/failing/81 threads dependency with version/test.json7
-rw-r--r--test cases/failing/82 gtest dependency with version/meson.build8
-rw-r--r--test cases/failing/82 gtest dependency with version/test.json7
-rw-r--r--test cases/failing/83 dub libray/meson.build11
-rw-r--r--test cases/failing/83 dub libray/test.json7
-rw-r--r--test cases/failing/84 dub executable/meson.build11
-rw-r--r--test cases/failing/84 dub executable/test.json7
-rw-r--r--test cases/failing/85 dub compiler/meson.build17
-rw-r--r--test cases/failing/85 dub compiler/test.json19
-rw-r--r--test cases/failing/86 subproj not-found dep/meson.build2
-rw-r--r--test cases/failing/86 subproj not-found dep/subprojects/somesubproj/meson.build3
-rw-r--r--test cases/failing/86 subproj not-found dep/test.json7
-rw-r--r--test cases/failing/87 invalid configure file/input0
-rw-r--r--test cases/failing/87 invalid configure file/meson.build9
-rw-r--r--test cases/failing/87 invalid configure file/test.json7
-rw-r--r--test cases/failing/88 kwarg dupe/meson.build6
-rw-r--r--test cases/failing/88 kwarg dupe/prog.c6
-rw-r--r--test cases/failing/88 kwarg dupe/test.json7
-rw-r--r--test cases/failing/89 missing pch file/meson.build3
-rw-r--r--test cases/failing/89 missing pch file/prog.c3
-rw-r--r--test cases/failing/89 missing pch file/test.json8
-rw-r--r--test cases/failing/9 missing extra file/meson.build3
-rw-r--r--test cases/failing/9 missing extra file/prog.c3
-rw-r--r--test cases/failing/9 missing extra file/test.json7
-rw-r--r--test cases/failing/90 pch source different folder/include/pch.h0
-rw-r--r--test cases/failing/90 pch source different folder/meson.build5
-rw-r--r--test cases/failing/90 pch source different folder/prog.c1
-rw-r--r--test cases/failing/90 pch source different folder/src/pch.c0
-rw-r--r--test cases/failing/90 pch source different folder/test.json7
-rw-r--r--test cases/failing/91 unknown config tool/meson.build2
-rw-r--r--test cases/failing/91 unknown config tool/test.json7
-rw-r--r--test cases/failing/92 custom target install data/Info.plist.cpp1
-rw-r--r--test cases/failing/92 custom target install data/meson.build11
-rw-r--r--test cases/failing/92 custom target install data/preproc.py13
-rw-r--r--test cases/failing/92 custom target install data/test.json7
-rw-r--r--test cases/failing/93 add dict non string key/meson.build9
-rw-r--r--test cases/failing/93 add dict non string key/test.json7
-rw-r--r--test cases/failing/94 add dict duplicate keys/meson.build9
-rw-r--r--test cases/failing/94 add dict duplicate keys/test.json7
-rw-r--r--test cases/failing/95 no host get_external_property/meson.build3
-rw-r--r--test cases/failing/95 no host get_external_property/test.json7
-rw-r--r--test cases/failing/96 no native compiler/main.c3
-rw-r--r--test cases/failing/96 no native compiler/meson.build12
-rw-r--r--test cases/failing/96 no native compiler/test.json7
-rw-r--r--test cases/failing/97 subdir parse error/meson.build2
-rw-r--r--test cases/failing/97 subdir parse error/subdir/meson.build1
-rw-r--r--test cases/failing/97 subdir parse error/test.json7
-rw-r--r--test cases/failing/98 invalid option file/meson.build1
-rw-r--r--test cases/failing/98 invalid option file/meson_options.txt1
-rw-r--r--test cases/failing/98 invalid option file/test.json7
-rw-r--r--test cases/failing/99 no lang/main.c3
-rw-r--r--test cases/failing/99 no lang/meson.build2
-rw-r--r--test cases/failing/99 no lang/test.json7
397 files changed, 2246 insertions, 0 deletions
diff --git a/test cases/failing/1 project not first/meson.build b/test cases/failing/1 project not first/meson.build
new file mode 100644
index 0000000..f30e155
--- /dev/null
+++ b/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/test cases/failing/1 project not first/prog.c b/test cases/failing/1 project not first/prog.c
new file mode 100644
index 0000000..0314ff1
--- /dev/null
+++ b/test cases/failing/1 project not first/prog.c
@@ -0,0 +1 @@
+int main(int argc, char **argv) { return 0; }
diff --git a/test cases/failing/1 project not first/test.json b/test cases/failing/1 project not first/test.json
new file mode 100644
index 0000000..27bae02
--- /dev/null
+++ b/test cases/failing/1 project not first/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "ERROR: Invalid source tree: first statement must be a call to project()"
+ }
+ ]
+}
diff --git a/test cases/failing/10 out of bounds/meson.build b/test cases/failing/10 out of bounds/meson.build
new file mode 100644
index 0000000..6917f7a
--- /dev/null
+++ b/test cases/failing/10 out of bounds/meson.build
@@ -0,0 +1,4 @@
+project('out of bounds')
+
+x = []
+y = x[0]
diff --git a/test cases/failing/10 out of bounds/test.json b/test cases/failing/10 out of bounds/test.json
new file mode 100644
index 0000000..e27d990
--- /dev/null
+++ b/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/test cases/failing/100 no glib-compile-resources/meson.build b/test cases/failing/100 no glib-compile-resources/meson.build
new file mode 100644
index 0000000..aae0569
--- /dev/null
+++ b/test cases/failing/100 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/test cases/failing/100 no glib-compile-resources/test.json b/test cases/failing/100 no glib-compile-resources/test.json
new file mode 100644
index 0000000..ad9ba29
--- /dev/null
+++ b/test cases/failing/100 no glib-compile-resources/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/100 no glib-compile-resources/meson.build:8:0: ERROR: Program 'glib-compile-resources' not found or not executable"
+ }
+ ]
+}
diff --git a/test cases/failing/100 no glib-compile-resources/trivial.gresource.xml b/test cases/failing/100 no glib-compile-resources/trivial.gresource.xml
new file mode 100644
index 0000000..1447b98
--- /dev/null
+++ b/test cases/failing/100 no glib-compile-resources/trivial.gresource.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+</gresources>
diff --git a/test cases/failing/101 number in combo/meson.build b/test cases/failing/101 number in combo/meson.build
new file mode 100644
index 0000000..1a647df
--- /dev/null
+++ b/test cases/failing/101 number in combo/meson.build
@@ -0,0 +1 @@
+project('number in combo')
diff --git a/test cases/failing/101 number in combo/nativefile.ini b/test cases/failing/101 number in combo/nativefile.ini
new file mode 100644
index 0000000..55f10fc
--- /dev/null
+++ b/test cases/failing/101 number in combo/nativefile.ini
@@ -0,0 +1,2 @@
+[built-in options]
+optimization = 1
diff --git a/test cases/failing/101 number in combo/test.json b/test cases/failing/101 number in combo/test.json
new file mode 100644
index 0000000..4c30f98
--- /dev/null
+++ b/test cases/failing/101 number in combo/test.json
@@ -0,0 +1,5 @@
+{
+ "stdout": [
+ { "line": "test cases/failing/101 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): \"plain\", \"0\", \"g\", \"1\", \"2\", \"3\", \"s\"." }
+ ]
+}
diff --git a/test cases/failing/102 bool in combo/meson.build b/test cases/failing/102 bool in combo/meson.build
new file mode 100644
index 0000000..c5efd67
--- /dev/null
+++ b/test cases/failing/102 bool in combo/meson.build
@@ -0,0 +1 @@
+project('bool in combo')
diff --git a/test cases/failing/102 bool in combo/meson_options.txt b/test cases/failing/102 bool in combo/meson_options.txt
new file mode 100644
index 0000000..0c8f5de
--- /dev/null
+++ b/test cases/failing/102 bool in combo/meson_options.txt
@@ -0,0 +1,5 @@
+option(
+ 'opt',
+ type : 'combo',
+ choices : ['true', 'false']
+)
diff --git a/test cases/failing/102 bool in combo/nativefile.ini b/test cases/failing/102 bool in combo/nativefile.ini
new file mode 100644
index 0000000..b423957
--- /dev/null
+++ b/test cases/failing/102 bool in combo/nativefile.ini
@@ -0,0 +1,2 @@
+[project options]
+opt = true
diff --git a/test cases/failing/102 bool in combo/test.json b/test cases/failing/102 bool in combo/test.json
new file mode 100644
index 0000000..c0041af
--- /dev/null
+++ b/test cases/failing/102 bool in combo/test.json
@@ -0,0 +1,5 @@
+{
+ "stdout": [
+ { "line": "test cases/failing/102 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/test cases/failing/103 compiler no lang/meson.build b/test cases/failing/103 compiler no lang/meson.build
new file mode 100644
index 0000000..366bbdd
--- /dev/null
+++ b/test cases/failing/103 compiler no lang/meson.build
@@ -0,0 +1,2 @@
+project('compiler without lang')
+meson.get_compiler('c')
diff --git a/test cases/failing/103 compiler no lang/test.json b/test cases/failing/103 compiler no lang/test.json
new file mode 100644
index 0000000..123dcb9
--- /dev/null
+++ b/test cases/failing/103 compiler no lang/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/103 compiler no lang/meson.build:2:6: ERROR: Tried to access compiler for language \"c\", not specified for host machine."
+ }
+ ]
+}
diff --git a/test cases/failing/104 no fallback/meson.build b/test cases/failing/104 no fallback/meson.build
new file mode 100644
index 0000000..91d6b93
--- /dev/null
+++ b/test cases/failing/104 no fallback/meson.build
@@ -0,0 +1,2 @@
+project('no fallback')
+foob_dep = dependency('foob', allow_fallback: false, required: true)
diff --git a/test cases/failing/104 no fallback/subprojects/foob/meson.build b/test cases/failing/104 no fallback/subprojects/foob/meson.build
new file mode 100644
index 0000000..b2c4814
--- /dev/null
+++ b/test cases/failing/104 no fallback/subprojects/foob/meson.build
@@ -0,0 +1,2 @@
+project('foob', 'c')
+meson.override_dependency('foob', declare_dependency())
diff --git a/test cases/failing/104 no fallback/test.json b/test cases/failing/104 no fallback/test.json
new file mode 100644
index 0000000..e034061
--- /dev/null
+++ b/test cases/failing/104 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/test cases/failing/105 feature require/meson.build b/test cases/failing/105 feature require/meson.build
new file mode 100644
index 0000000..8c47e37
--- /dev/null
+++ b/test cases/failing/105 feature require/meson.build
@@ -0,0 +1,2 @@
+project('no fallback')
+foo = get_option('reqfeature').require(false, error_message: 'frobnicator not available')
diff --git a/test cases/failing/105 feature require/meson_options.txt b/test cases/failing/105 feature require/meson_options.txt
new file mode 100644
index 0000000..5910a87
--- /dev/null
+++ b/test cases/failing/105 feature require/meson_options.txt
@@ -0,0 +1 @@
+option('reqfeature', type : 'feature', value : 'enabled', description : 'A required feature')
diff --git a/test cases/failing/105 feature require/test.json b/test cases/failing/105 feature require/test.json
new file mode 100644
index 0000000..7c4640d
--- /dev/null
+++ b/test cases/failing/105 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/test cases/failing/106 feature require.bis/meson.build b/test cases/failing/106 feature require.bis/meson.build
new file mode 100644
index 0000000..4ea65e5
--- /dev/null
+++ b/test cases/failing/106 feature require.bis/meson.build
@@ -0,0 +1,2 @@
+project('no fallback')
+foo = get_option('reqfeature').require(false)
diff --git a/test cases/failing/106 feature require.bis/meson_options.txt b/test cases/failing/106 feature require.bis/meson_options.txt
new file mode 100644
index 0000000..5910a87
--- /dev/null
+++ b/test cases/failing/106 feature require.bis/meson_options.txt
@@ -0,0 +1 @@
+option('reqfeature', type : 'feature', value : 'enabled', description : 'A required feature')
diff --git a/test cases/failing/106 feature require.bis/test.json b/test cases/failing/106 feature require.bis/test.json
new file mode 100644
index 0000000..2583990
--- /dev/null
+++ b/test cases/failing/106 feature require.bis/test.json
@@ -0,0 +1,8 @@
+{
+ "stdout": [
+ {
+ "match": "re",
+ "line": ".*/meson\\.build:2:0: ERROR: Feature reqfeature cannot be enabled"
+ }
+ ]
+}
diff --git a/test cases/failing/107 no build get_external_property/meson.build b/test cases/failing/107 no build get_external_property/meson.build
new file mode 100644
index 0000000..8a4215c
--- /dev/null
+++ b/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/test cases/failing/107 no build get_external_property/test.json b/test cases/failing/107 no build get_external_property/test.json
new file mode 100644
index 0000000..b95427e
--- /dev/null
+++ b/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/test cases/failing/108 enter subdir twice/meson.build b/test cases/failing/108 enter subdir twice/meson.build
new file mode 100644
index 0000000..d9bf9f5
--- /dev/null
+++ b/test cases/failing/108 enter subdir twice/meson.build
@@ -0,0 +1,3 @@
+project('subdir2')
+subdir('sub')
+subdir('sub')
diff --git a/test cases/failing/108 enter subdir twice/sub/meson.build b/test cases/failing/108 enter subdir twice/sub/meson.build
new file mode 100644
index 0000000..d036a3f
--- /dev/null
+++ b/test cases/failing/108 enter subdir twice/sub/meson.build
@@ -0,0 +1 @@
+message('Now in subdir')
diff --git a/test cases/failing/108 enter subdir twice/test.json b/test cases/failing/108 enter subdir twice/test.json
new file mode 100644
index 0000000..0a8e127
--- /dev/null
+++ b/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/test cases/failing/109 invalid fstring/109 invalid fstring/meson.build b/test cases/failing/109 invalid fstring/109 invalid fstring/meson.build
new file mode 100644
index 0000000..dd22f56
--- /dev/null
+++ b/test cases/failing/109 invalid fstring/109 invalid fstring/meson.build
@@ -0,0 +1,4 @@
+project('invalid-fstring', 'c')
+
+dict = {'key': true}
+s = f'invalid fstring: @dict@'
diff --git a/test cases/failing/109 invalid fstring/109 invalid fstring/test.json b/test cases/failing/109 invalid fstring/109 invalid fstring/test.json
new file mode 100644
index 0000000..71d8f59
--- /dev/null
+++ b/test cases/failing/109 invalid fstring/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/test cases/failing/109 invalid fstring/meson.build b/test cases/failing/109 invalid fstring/meson.build
new file mode 100644
index 0000000..7eb3ccf
--- /dev/null
+++ b/test cases/failing/109 invalid fstring/meson.build
@@ -0,0 +1,3 @@
+project('invalid-fstring')
+
+z = f'invalid fstring: @foo@'
diff --git a/test cases/failing/109 invalid fstring/test.json b/test cases/failing/109 invalid fstring/test.json
new file mode 100644
index 0000000..a095d62
--- /dev/null
+++ b/test cases/failing/109 invalid fstring/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/109 invalid fstring/meson.build:3:0: ERROR: Identifier \"foo\" does not name a variable."
+ }
+ ]
+}
diff --git a/test cases/failing/11 object arithmetic/meson.build b/test cases/failing/11 object arithmetic/meson.build
new file mode 100644
index 0000000..34e3a7a
--- /dev/null
+++ b/test cases/failing/11 object arithmetic/meson.build
@@ -0,0 +1,3 @@
+project('object arithmetic')
+
+foo = '5' + meson
diff --git a/test cases/failing/11 object arithmetic/test.json b/test cases/failing/11 object arithmetic/test.json
new file mode 100644
index 0000000..822e504
--- /dev/null
+++ b/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: The `\\+` operator of str does not accept objects of type MesonMain .*"
+ }
+ ]
+}
diff --git a/test cases/failing/110 compiler argument checking/meson.build b/test cases/failing/110 compiler argument checking/meson.build
new file mode 100644
index 0000000..bb1f447
--- /dev/null
+++ b/test cases/failing/110 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/test cases/failing/110 compiler argument checking/test.json b/test cases/failing/110 compiler argument checking/test.json
new file mode 100644
index 0000000..3de6acb
--- /dev/null
+++ b/test cases/failing/110 compiler argument checking/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/110 compiler argument checking/meson.build:4:0: ERROR: Compiler for C does not support \"-meson-goober-arg-for-testing\""
+ }
+ ]
+}
diff --git a/test cases/failing/111 empty fallback/meson.build b/test cases/failing/111 empty fallback/meson.build
new file mode 100644
index 0000000..f4eb5fe
--- /dev/null
+++ b/test cases/failing/111 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/test cases/failing/111 empty fallback/subprojects/foo/meson.build b/test cases/failing/111 empty fallback/subprojects/foo/meson.build
new file mode 100644
index 0000000..c9e134b
--- /dev/null
+++ b/test cases/failing/111 empty fallback/subprojects/foo/meson.build
@@ -0,0 +1,3 @@
+project('foo')
+
+meson.override_dependency('foo', declare_dependency())
diff --git a/test cases/failing/111 empty fallback/test.json b/test cases/failing/111 empty fallback/test.json
new file mode 100644
index 0000000..022e747
--- /dev/null
+++ b/test cases/failing/111 empty fallback/test.json
@@ -0,0 +1,8 @@
+{
+ "stdout": [
+ {
+ "match": "re",
+ "line": "test cases/failing/111 empty fallback/meson.build:6:0: ERROR: Dependency \"foo\" not found.*"
+ }
+ ]
+}
diff --git a/test cases/failing/112 cmake executable dependency/meson.build b/test cases/failing/112 cmake executable dependency/meson.build
new file mode 100644
index 0000000..48d8fcb
--- /dev/null
+++ b/test cases/failing/112 cmake executable dependency/meson.build
@@ -0,0 +1,9 @@
+project('cmake-executable-dependency', 'c')
+
+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/test cases/failing/112 cmake executable dependency/subprojects/cmlib/CMakeLists.txt b/test cases/failing/112 cmake executable dependency/subprojects/cmlib/CMakeLists.txt
new file mode 100644
index 0000000..0067879
--- /dev/null
+++ b/test cases/failing/112 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/test cases/failing/112 cmake executable dependency/subprojects/cmlib/main.c b/test cases/failing/112 cmake executable dependency/subprojects/cmlib/main.c
new file mode 100644
index 0000000..9b6bdc2
--- /dev/null
+++ b/test cases/failing/112 cmake executable dependency/subprojects/cmlib/main.c
@@ -0,0 +1,3 @@
+int main(void) {
+ return 0;
+}
diff --git a/test cases/failing/112 cmake executable dependency/test.json b/test cases/failing/112 cmake executable dependency/test.json
new file mode 100644
index 0000000..c1ccf6c
--- /dev/null
+++ b/test cases/failing/112 cmake executable dependency/test.json
@@ -0,0 +1,10 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/112 cmake executable dependency/meson.build:9:0: ERROR: main is an executable and does not support the dependency() method. Use target() instead."
+ }
+ ],
+ "tools": {
+ "cmake": ">=3.14"
+ }
+}
diff --git a/test cases/failing/113 allow_fallback with fallback/meson.build b/test cases/failing/113 allow_fallback with fallback/meson.build
new file mode 100644
index 0000000..2874e42
--- /dev/null
+++ b/test cases/failing/113 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/test cases/failing/113 allow_fallback with fallback/test.json b/test cases/failing/113 allow_fallback with fallback/test.json
new file mode 100644
index 0000000..58ed475
--- /dev/null
+++ b/test cases/failing/113 allow_fallback with fallback/test.json
@@ -0,0 +1,8 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/113 allow_fallback with fallback/meson.build:3:0: ERROR: \"fallback\" and \"allow_fallback\" arguments are mutually exclusive"
+ }
+ ]
+}
+
diff --git a/test cases/failing/114 nonsensical bindgen/meson.build b/test cases/failing/114 nonsensical bindgen/meson.build
new file mode 100644
index 0000000..6995f67
--- /dev/null
+++ b/test cases/failing/114 nonsensical bindgen/meson.build
@@ -0,0 +1,20 @@
+# SPDX-license-identifer: Apache-2.0
+# Copyright ยฉ 2021 Intel Corporation
+
+project('rustmod bindgen', 'c')
+
+if not add_languages('rust', required: false)
+ error('MESON_SKIP_TEST test requires rust compiler')
+endif
+
+prog_bindgen = find_program('bindgen', required : false)
+if not prog_bindgen.found()
+ error('MESON_SKIP_TEST bindgen not found')
+endif
+
+c_lib = static_library('clib', 'src/source.c')
+
+import('unstable-rust').bindgen(
+ input : c_lib,
+ output : 'header.rs',
+)
diff --git a/test cases/failing/114 nonsensical bindgen/src/header.h b/test cases/failing/114 nonsensical bindgen/src/header.h
new file mode 100644
index 0000000..750621f
--- /dev/null
+++ b/test cases/failing/114 nonsensical bindgen/src/header.h
@@ -0,0 +1,8 @@
+// SPDX-license-identifer: Apache-2.0
+// Copyright ยฉ 2021 Intel Corporation
+
+#pragma once
+
+#include <stdint.h>
+
+int32_t add(const int32_t, const int32_t);
diff --git a/test cases/failing/114 nonsensical bindgen/src/source.c b/test cases/failing/114 nonsensical bindgen/src/source.c
new file mode 100644
index 0000000..d652d28
--- /dev/null
+++ b/test cases/failing/114 nonsensical bindgen/src/source.c
@@ -0,0 +1,8 @@
+// SPDX-license-identifer: Apache-2.0
+// Copyright ยฉ 2021 Intel Corporation
+
+#include "header.h"
+
+int32_t add(const int32_t first, const int32_t second) {
+ return first + second;
+}
diff --git a/test cases/failing/114 nonsensical bindgen/test.json b/test cases/failing/114 nonsensical bindgen/test.json
new file mode 100644
index 0000000..bc85311
--- /dev/null
+++ b/test cases/failing/114 nonsensical bindgen/test.json
@@ -0,0 +1,8 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/114 nonsensical bindgen/meson.build:17:24: ERROR: bindgen source file must be a C header, not an object or build target"
+ }
+ ]
+}
+
diff --git a/test cases/failing/115 run_target in test/meson.build b/test cases/failing/115 run_target in test/meson.build
new file mode 100644
index 0000000..1d448ec
--- /dev/null
+++ b/test cases/failing/115 run_target in test/meson.build
@@ -0,0 +1,7 @@
+project('trivial test', 'c')
+
+py_inst = import('python').find_installation()
+
+exe = executable('trivialprog', 'trivial.c')
+runt = run_target('invalid', command: [py_inst, '--version'])
+test('runtest', exe, args: runt)
diff --git a/test cases/failing/115 run_target in test/test.json b/test cases/failing/115 run_target in test/test.json
new file mode 100644
index 0000000..6eddb7c
--- /dev/null
+++ b/test cases/failing/115 run_target in test/test.json
@@ -0,0 +1,8 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/115 run_target in test/meson.build:7:0: ERROR: test keyword argument 'args' was of type array[RunTarget] but should have been array[str | File | BuildTarget | CustomTarget | CustomTargetIndex]"
+ }
+ ]
+}
+
diff --git a/test cases/failing/115 run_target in test/trivial.c b/test cases/failing/115 run_target in test/trivial.c
new file mode 100644
index 0000000..96612d4
--- /dev/null
+++ b/test cases/failing/115 run_target in test/trivial.c
@@ -0,0 +1,6 @@
+#include<stdio.h>
+
+int main(void) {
+ printf("Trivial test is working.\n");
+ return 0;
+}
diff --git a/test cases/failing/116 run_target in add_install_script/meson.build b/test cases/failing/116 run_target in add_install_script/meson.build
new file mode 100644
index 0000000..f8ae3a1
--- /dev/null
+++ b/test cases/failing/116 run_target in add_install_script/meson.build
@@ -0,0 +1,7 @@
+project('trivial test', 'c')
+
+py_inst = import('python').find_installation()
+
+exe = executable('trivialprog', 'trivial.c')
+runt = run_target('invalid', command: [py_inst, '--version'])
+meson.add_install_script(exe, runt)
diff --git a/test cases/failing/116 run_target in add_install_script/test.json b/test cases/failing/116 run_target in add_install_script/test.json
new file mode 100644
index 0000000..03027e4
--- /dev/null
+++ b/test cases/failing/116 run_target in add_install_script/test.json
@@ -0,0 +1,8 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/116 run_target in add_install_script/meson.build:7:6: ERROR: meson.add_install_script argument 2 was of type \"RunTarget\" but should have been one of: \"str\", \"File\", \"BuildTarget\", \"CustomTarget\", \"CustomTargetIndex\", \"ExternalProgram\""
+ }
+ ]
+}
+
diff --git a/test cases/failing/116 run_target in add_install_script/trivial.c b/test cases/failing/116 run_target in add_install_script/trivial.c
new file mode 100644
index 0000000..1b14571
--- /dev/null
+++ b/test cases/failing/116 run_target in add_install_script/trivial.c
@@ -0,0 +1,11 @@
+#include<stdio.h>
+
+int main(int argc, char **argv) {
+ FILE *fp = fopen(argv[1], "r");
+ if (fp == NULL) {
+ perror("fopen");
+ return 1;
+ } else {
+ return 0;
+ }
+}
diff --git a/test cases/failing/117 pathsep in install_symlink/meson.build b/test cases/failing/117 pathsep in install_symlink/meson.build
new file mode 100644
index 0000000..cce82c2
--- /dev/null
+++ b/test cases/failing/117 pathsep in install_symlink/meson.build
@@ -0,0 +1,3 @@
+project('symlink_pathsep')
+
+install_symlink('foo/bar', pointing_to: '/usr/baz/bar', install_dir: '/usr')
diff --git a/test cases/failing/117 pathsep in install_symlink/test.json b/test cases/failing/117 pathsep in install_symlink/test.json
new file mode 100644
index 0000000..aa35619
--- /dev/null
+++ b/test cases/failing/117 pathsep in install_symlink/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/117 pathsep in install_symlink/meson.build:3:0: ERROR: Link name is \"foo/bar\", but link names cannot contain path separators. The dir part should be in install_dir."
+ }
+ ]
+}
diff --git a/test cases/failing/118 subproject version conflict/meson.build b/test cases/failing/118 subproject version conflict/meson.build
new file mode 100644
index 0000000..ffbcc13
--- /dev/null
+++ b/test cases/failing/118 subproject version conflict/meson.build
@@ -0,0 +1,4 @@
+project('120 subproject version conflict')
+
+A_dep = subproject('A').get_variable('A_dep')
+B_dep = subproject('B', version: '1').get_variable('B_dep')
diff --git a/test cases/failing/118 subproject version conflict/subprojects/A/meson.build b/test cases/failing/118 subproject version conflict/subprojects/A/meson.build
new file mode 100644
index 0000000..7da4df0
--- /dev/null
+++ b/test cases/failing/118 subproject version conflict/subprojects/A/meson.build
@@ -0,0 +1,4 @@
+project('A')
+
+B_dep = subproject('B').get_variable('B_dep')
+A_dep = declare_dependency(dependencies: B_dep)
diff --git a/test cases/failing/118 subproject version conflict/subprojects/B/meson.build b/test cases/failing/118 subproject version conflict/subprojects/B/meson.build
new file mode 100644
index 0000000..0ead934
--- /dev/null
+++ b/test cases/failing/118 subproject version conflict/subprojects/B/meson.build
@@ -0,0 +1,3 @@
+project('B', version: '100')
+
+B_dep = declare_dependency()
diff --git a/test cases/failing/118 subproject version conflict/test.json b/test cases/failing/118 subproject version conflict/test.json
new file mode 100644
index 0000000..a31511c
--- /dev/null
+++ b/test cases/failing/118 subproject version conflict/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/118 subproject version conflict/meson.build:4:0: ERROR: Subproject B version is 100 but ['1'] required."
+ }
+ ]
+}
diff --git a/test cases/failing/119 structured source empty string/main.rs b/test cases/failing/119 structured source empty string/main.rs
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test cases/failing/119 structured source empty string/main.rs
diff --git a/test cases/failing/119 structured source empty string/meson.build b/test cases/failing/119 structured source empty string/meson.build
new file mode 100644
index 0000000..0715991
--- /dev/null
+++ b/test cases/failing/119 structured source empty string/meson.build
@@ -0,0 +1,13 @@
+project('structured_source with empty string key')
+
+if not add_languages(['rust'], required : false, native : false)
+ error('MESON_SKIP_TEST: Rust is required but not found.')
+endif
+
+executable(
+ 'main',
+ structured_sources(
+ 'main.rs',
+ {'' : 'main.rs'},
+ )
+)
diff --git a/test cases/failing/119 structured source empty string/test.json b/test cases/failing/119 structured source empty string/test.json
new file mode 100644
index 0000000..3d41fc2
--- /dev/null
+++ b/test cases/failing/119 structured source empty string/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/119 structured source empty string/meson.build:7:0: ERROR: structured_sources: keys to dictionary argument may not be an empty string."
+ }
+ ]
+}
diff --git a/test cases/failing/12 string arithmetic/meson.build b/test cases/failing/12 string arithmetic/meson.build
new file mode 100644
index 0000000..8bdd451
--- /dev/null
+++ b/test cases/failing/12 string arithmetic/meson.build
@@ -0,0 +1,3 @@
+project('string arithmetic')
+
+foo = 'a' + 3
diff --git a/test cases/failing/12 string arithmetic/test.json b/test cases/failing/12 string arithmetic/test.json
new file mode 100644
index 0000000..96595c8
--- /dev/null
+++ b/test cases/failing/12 string arithmetic/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/12 string arithmetic/meson.build:3:0: ERROR: The `+` operator of str does not accept objects of type int (3)"
+ }
+ ]
+}
diff --git a/test cases/failing/120 structured_sources conflicts/main.rs b/test cases/failing/120 structured_sources conflicts/main.rs
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test cases/failing/120 structured_sources conflicts/main.rs
diff --git a/test cases/failing/120 structured_sources conflicts/meson.build b/test cases/failing/120 structured_sources conflicts/meson.build
new file mode 100644
index 0000000..561ad86
--- /dev/null
+++ b/test cases/failing/120 structured_sources conflicts/meson.build
@@ -0,0 +1,17 @@
+project('structured_source with empty string key')
+
+if not add_languages(['rust'], required : false, native : false)
+ error('MESON_SKIP_TEST: Rust is required but not found.')
+endif
+
+executable(
+ 'main',
+ [
+ structured_sources(
+ 'main.rs',
+ ),
+ structured_sources(
+ 'main.rs',
+ ),
+ ],
+)
diff --git a/test cases/failing/120 structured_sources conflicts/test.json b/test cases/failing/120 structured_sources conflicts/test.json
new file mode 100644
index 0000000..2f3d1ef
--- /dev/null
+++ b/test cases/failing/120 structured_sources conflicts/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/120 structured_sources conflicts/meson.build:7:0: ERROR: Conflicting sources in structured sources: main.rs"
+ }
+ ]
+}
diff --git a/test cases/failing/121 missing compiler/meson.build b/test cases/failing/121 missing compiler/meson.build
new file mode 100644
index 0000000..19bdd0c
--- /dev/null
+++ b/test cases/failing/121 missing compiler/meson.build
@@ -0,0 +1,3 @@
+project('main project', 'c')
+
+subproject('sub')
diff --git a/test cases/failing/121 missing compiler/subprojects/sub/main.c b/test cases/failing/121 missing compiler/subprojects/sub/main.c
new file mode 100644
index 0000000..44e82e2
--- /dev/null
+++ b/test cases/failing/121 missing compiler/subprojects/sub/main.c
@@ -0,0 +1 @@
+int main(int argc, char *argv[]) { return 0; }
diff --git a/test cases/failing/121 missing compiler/subprojects/sub/meson.build b/test cases/failing/121 missing compiler/subprojects/sub/meson.build
new file mode 100644
index 0000000..b60850c
--- /dev/null
+++ b/test cases/failing/121 missing compiler/subprojects/sub/meson.build
@@ -0,0 +1,4 @@
+project('sub')
+
+# Should fail because we did not add C language, even if parent project did.
+executable('app', 'main.c')
diff --git a/test cases/failing/121 missing compiler/test.json b/test cases/failing/121 missing compiler/test.json
new file mode 100644
index 0000000..442e331
--- /dev/null
+++ b/test cases/failing/121 missing compiler/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/121 missing compiler/subprojects/sub/meson.build:4:0: ERROR: No host machine compiler for 'subprojects/sub/main.c'"
+ }
+ ]
+}
diff --git a/test cases/failing/122 cmake subproject error/meson.build b/test cases/failing/122 cmake subproject error/meson.build
new file mode 100644
index 0000000..a308239
--- /dev/null
+++ b/test cases/failing/122 cmake subproject error/meson.build
@@ -0,0 +1,8 @@
+project('cmake-executable-dependency')
+
+if not find_program('cmake', required: false).found()
+ error('MESON_SKIP_TEST CMake is not installed')
+endif
+
+cmake = import('cmake')
+cmlib = cmake.subproject('cmlib')
diff --git a/test cases/failing/122 cmake subproject error/subprojects/cmlib/CMakeLists.txt b/test cases/failing/122 cmake subproject error/subprojects/cmlib/CMakeLists.txt
new file mode 100644
index 0000000..edbe395
--- /dev/null
+++ b/test cases/failing/122 cmake subproject error/subprojects/cmlib/CMakeLists.txt
@@ -0,0 +1,5 @@
+cmake_minimum_required(VERSION 3.5)
+
+project(cmlib)
+
+message(FATAL_ERROR "Fancy error message")
diff --git a/test cases/failing/122 cmake subproject error/test.json b/test cases/failing/122 cmake subproject error/test.json
new file mode 100644
index 0000000..1201da2
--- /dev/null
+++ b/test cases/failing/122 cmake subproject error/test.json
@@ -0,0 +1,10 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/122 cmake subproject error/meson.build:8:0: ERROR: Failed to configure the CMake subproject: Fancy error message"
+ }
+ ],
+ "tools": {
+ "cmake": ">=3.14"
+ }
+}
diff --git a/test cases/failing/123 pkgconfig not relocatable outside prefix/meson.build b/test cases/failing/123 pkgconfig not relocatable outside prefix/meson.build
new file mode 100644
index 0000000..7ebdfc3
--- /dev/null
+++ b/test cases/failing/123 pkgconfig not relocatable outside prefix/meson.build
@@ -0,0 +1,22 @@
+project(
+ 'pkgconfig-not-relocatable-outside-prefix',
+ version : '1.0',
+ default_options: [
+ 'pkgconfig.relocatable=true',
+ ])
+
+pkgg = import('pkgconfig')
+
+# A drive letter is needed on windows for this to be an absolute path.
+if host_machine.system() == 'windows'
+ install_dir = 'C:/opt/lib/pkgconfig'
+else
+ install_dir = '/opt/lib/pkgconfig'
+endif
+
+pkgg.generate(
+ name : 'libsimple',
+ version : '1.0',
+ description : 'A simple pkgconfig file.',
+ install_dir: install_dir,
+)
diff --git a/test cases/failing/123 pkgconfig not relocatable outside prefix/test.json b/test cases/failing/123 pkgconfig not relocatable outside prefix/test.json
new file mode 100644
index 0000000..2ca1320
--- /dev/null
+++ b/test cases/failing/123 pkgconfig not relocatable outside prefix/test.json
@@ -0,0 +1,8 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/123 pkgconfig not relocatable outside prefix/meson\\.build:17:5: ERROR: Pkgconfig prefix cannot be outside of the prefix when pkgconfig\\.relocatable=true. Pkgconfig prefix is (C:)?/opt/lib/pkgconfig.",
+ "match": "re"
+ }
+ ]
+}
diff --git a/test cases/failing/124 subproject sandbox violation/meson.build b/test cases/failing/124 subproject sandbox violation/meson.build
new file mode 100644
index 0000000..d41994c
--- /dev/null
+++ b/test cases/failing/124 subproject sandbox violation/meson.build
@@ -0,0 +1,34 @@
+project('subproject-sandbox-violation')
+
+sub1_d = subproject('subproj1').get_variable('d')
+sub1_mustfail = sub1_d.get_variable('dir') / '..' / 'file.txt'
+
+sub2_d = subproject('subproj2').get_variable('d')
+sub2_mustfail = sub2_d.get_variable('dir') / 'file.txt'
+
+main_d = declare_dependency(
+ variables: [
+ 'dir=@0@'.format(meson.current_source_dir()),
+ ]
+)
+main_mustfail = main_d.get_variable('dir') / 'subprojects/subproj3/file.txt'
+
+if get_option('failmode') == 'parent-dir'
+ mustfail = sub1_mustfail
+elif get_option('failmode') == 'not-installed'
+ mustfail = sub2_mustfail
+elif get_option('failmode') == 'root-subdir'
+ mustfail = main_mustfail
+endif
+
+custom_target(
+ 'mustfail',
+ input: mustfail,
+ output: 'file.txt',
+ command: [
+ 'python3', '-c',
+ 'import os; shutil.copy(sys.argv[1], sys.argv[2])',
+ '@INPUT@',
+ '@OUTPUT@'
+ ],
+)
diff --git a/test cases/failing/124 subproject sandbox violation/meson_options.txt b/test cases/failing/124 subproject sandbox violation/meson_options.txt
new file mode 100644
index 0000000..e7b782d
--- /dev/null
+++ b/test cases/failing/124 subproject sandbox violation/meson_options.txt
@@ -0,0 +1 @@
+option('failmode', type: 'combo', choices: ['parent-dir', 'not-installed', 'root-subdir'])
diff --git a/test cases/failing/124 subproject sandbox violation/subprojects/subproj1/file.txt b/test cases/failing/124 subproject sandbox violation/subprojects/subproj1/file.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test cases/failing/124 subproject sandbox violation/subprojects/subproj1/file.txt
diff --git a/test cases/failing/124 subproject sandbox violation/subprojects/subproj1/meson.build b/test cases/failing/124 subproject sandbox violation/subprojects/subproj1/meson.build
new file mode 100644
index 0000000..bd33bf3
--- /dev/null
+++ b/test cases/failing/124 subproject sandbox violation/subprojects/subproj1/meson.build
@@ -0,0 +1,4 @@
+project('subproj1')
+
+install_data('file.txt')
+subdir('nested')
diff --git a/test cases/failing/124 subproject sandbox violation/subprojects/subproj1/nested/meson.build b/test cases/failing/124 subproject sandbox violation/subprojects/subproj1/nested/meson.build
new file mode 100644
index 0000000..038c139
--- /dev/null
+++ b/test cases/failing/124 subproject sandbox violation/subprojects/subproj1/nested/meson.build
@@ -0,0 +1,5 @@
+d = declare_dependency(
+ variables: [
+ 'dir=@0@'.format(meson.current_source_dir()),
+ ]
+)
diff --git a/test cases/failing/124 subproject sandbox violation/subprojects/subproj2/file.txt b/test cases/failing/124 subproject sandbox violation/subprojects/subproj2/file.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test cases/failing/124 subproject sandbox violation/subprojects/subproj2/file.txt
diff --git a/test cases/failing/124 subproject sandbox violation/subprojects/subproj2/meson.build b/test cases/failing/124 subproject sandbox violation/subprojects/subproj2/meson.build
new file mode 100644
index 0000000..a6032aa
--- /dev/null
+++ b/test cases/failing/124 subproject sandbox violation/subprojects/subproj2/meson.build
@@ -0,0 +1,7 @@
+project('subproj1')
+
+d = declare_dependency(
+ variables: [
+ 'dir=@0@'.format(meson.current_source_dir()),
+ ]
+)
diff --git a/test cases/failing/124 subproject sandbox violation/subprojects/subproj2/nested/meson.build b/test cases/failing/124 subproject sandbox violation/subprojects/subproj2/nested/meson.build
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test cases/failing/124 subproject sandbox violation/subprojects/subproj2/nested/meson.build
diff --git a/test cases/failing/124 subproject sandbox violation/subprojects/subproj3/file.txt b/test cases/failing/124 subproject sandbox violation/subprojects/subproj3/file.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test cases/failing/124 subproject sandbox violation/subprojects/subproj3/file.txt
diff --git a/test cases/failing/124 subproject sandbox violation/subprojects/subproj3/meson.build b/test cases/failing/124 subproject sandbox violation/subprojects/subproj3/meson.build
new file mode 100644
index 0000000..c4fa64c
--- /dev/null
+++ b/test cases/failing/124 subproject sandbox violation/subprojects/subproj3/meson.build
@@ -0,0 +1,3 @@
+project('subproj2')
+
+install_data('file.txt')
diff --git a/test cases/failing/124 subproject sandbox violation/test.json b/test cases/failing/124 subproject sandbox violation/test.json
new file mode 100644
index 0000000..ca3d142
--- /dev/null
+++ b/test cases/failing/124 subproject sandbox violation/test.json
@@ -0,0 +1,16 @@
+{
+ "matrix": {
+ "options": {
+ "failmode": [
+ { "val": "not-installed" },
+ { "val": "parent-dir" },
+ { "val": "root-subdir" }
+ ]
+ }
+ },
+ "stdout": [
+ {
+ "line": "test cases/failing/124 subproject sandbox violation/meson.build:24:0: ERROR: Sandbox violation: Tried to grab file file.txt from a nested subproject."
+ }
+ ]
+}
diff --git a/test cases/failing/125 override and add_project_dependency/inc/lib.h b/test cases/failing/125 override and add_project_dependency/inc/lib.h
new file mode 100644
index 0000000..4cfc47e
--- /dev/null
+++ b/test cases/failing/125 override and add_project_dependency/inc/lib.h
@@ -0,0 +1,2 @@
+#pragma once
+void f(void);
diff --git a/test cases/failing/125 override and add_project_dependency/lib.c b/test cases/failing/125 override and add_project_dependency/lib.c
new file mode 100644
index 0000000..b8b22a3
--- /dev/null
+++ b/test cases/failing/125 override and add_project_dependency/lib.c
@@ -0,0 +1,3 @@
+#include <stdio.h>
+#include "lib.h"
+void f() {puts("hello");}
diff --git a/test cases/failing/125 override and add_project_dependency/meson.build b/test cases/failing/125 override and add_project_dependency/meson.build
new file mode 100644
index 0000000..c878b01
--- /dev/null
+++ b/test cases/failing/125 override and add_project_dependency/meson.build
@@ -0,0 +1,8 @@
+project('super', 'c')
+
+inc = include_directories('inc')
+lib = static_library('sneaky', 'lib.c', include_directories: inc)
+meson.override_dependency('sneaky',
+ declare_dependency(link_with: lib, include_directories: inc))
+
+subproject('a')
diff --git a/test cases/failing/125 override and add_project_dependency/subprojects/a/meson.build b/test cases/failing/125 override and add_project_dependency/subprojects/a/meson.build
new file mode 100644
index 0000000..4f6f070
--- /dev/null
+++ b/test cases/failing/125 override and add_project_dependency/subprojects/a/meson.build
@@ -0,0 +1,10 @@
+project('a', 'c')
+
+dep = dependency('sneaky')
+
+# does not work
+add_project_dependencies(dep, language: 'c')
+executable('prog', 'prog.c')
+
+# this would work instead:
+# executable('prog', 'prog.c', dependencies: dep)
diff --git a/test cases/failing/125 override and add_project_dependency/subprojects/a/prog.c b/test cases/failing/125 override and add_project_dependency/subprojects/a/prog.c
new file mode 100644
index 0000000..ce60f81
--- /dev/null
+++ b/test cases/failing/125 override and add_project_dependency/subprojects/a/prog.c
@@ -0,0 +1,6 @@
+#include "lib.h"
+
+int main() {
+ f();
+ return 0;
+}
diff --git a/test cases/failing/125 override and add_project_dependency/test.json b/test cases/failing/125 override and add_project_dependency/test.json
new file mode 100644
index 0000000..df749ec
--- /dev/null
+++ b/test cases/failing/125 override and add_project_dependency/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/125 override and add_project_dependency/subprojects/a/meson.build:6:0: ERROR: Dependencies must be external dependencies"
+ }
+ ]
+}
diff --git a/test cases/failing/126 targets before add_project_dependency/inc/lib.h b/test cases/failing/126 targets before add_project_dependency/inc/lib.h
new file mode 100644
index 0000000..4cfc47e
--- /dev/null
+++ b/test cases/failing/126 targets before add_project_dependency/inc/lib.h
@@ -0,0 +1,2 @@
+#pragma once
+void f(void);
diff --git a/test cases/failing/126 targets before add_project_dependency/lib.c b/test cases/failing/126 targets before add_project_dependency/lib.c
new file mode 100644
index 0000000..b8b22a3
--- /dev/null
+++ b/test cases/failing/126 targets before add_project_dependency/lib.c
@@ -0,0 +1,3 @@
+#include <stdio.h>
+#include "lib.h"
+void f() {puts("hello");}
diff --git a/test cases/failing/126 targets before add_project_dependency/meson.build b/test cases/failing/126 targets before add_project_dependency/meson.build
new file mode 100644
index 0000000..38fe102
--- /dev/null
+++ b/test cases/failing/126 targets before add_project_dependency/meson.build
@@ -0,0 +1,5 @@
+project('test', 'c')
+
+static_library('lib', 'lib.c')
+inc = include_directories('inc')
+add_project_dependencies(declare_dependency(include_directories: inc), language: 'c')
diff --git a/test cases/failing/126 targets before add_project_dependency/test.json b/test cases/failing/126 targets before add_project_dependency/test.json
new file mode 100644
index 0000000..d467914
--- /dev/null
+++ b/test cases/failing/126 targets before add_project_dependency/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/126 targets before add_project_dependency/meson.build:5:0: ERROR: Tried to use 'add_project_dependencies' after a build target has been declared."
+ }
+ ]
+}
diff --git a/test cases/failing/127 extract from unity/meson.build b/test cases/failing/127 extract from unity/meson.build
new file mode 100644
index 0000000..9e3e65f
--- /dev/null
+++ b/test cases/failing/127 extract from unity/meson.build
@@ -0,0 +1,4 @@
+project('extract nonexisting gen', 'c')
+
+lib1 = library('lib1', 'src1.c', 'src2.c', override_options: ['unity=on'])
+lib2 = library('lib2', objects: lib1.extract_objects('src1.c'))
diff --git a/test cases/failing/127 extract from unity/src1.c b/test cases/failing/127 extract from unity/src1.c
new file mode 100644
index 0000000..da971bb
--- /dev/null
+++ b/test cases/failing/127 extract from unity/src1.c
@@ -0,0 +1,3 @@
+int sub_lib_method1() {
+ return 1337;
+}
diff --git a/test cases/failing/127 extract from unity/src2.c b/test cases/failing/127 extract from unity/src2.c
new file mode 100644
index 0000000..a461669
--- /dev/null
+++ b/test cases/failing/127 extract from unity/src2.c
@@ -0,0 +1,3 @@
+int sub_lib_method2() {
+ return 1337;
+}
diff --git a/test cases/failing/127 extract from unity/test.json b/test cases/failing/127 extract from unity/test.json
new file mode 100644
index 0000000..e27599d
--- /dev/null
+++ b/test cases/failing/127 extract from unity/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/127 extract from unity/meson.build:4:0: ERROR: Single object files can not be extracted in Unity builds. You can only extract all the object files for each compiler at once."
+ }
+ ]
+}
diff --git a/test cases/failing/128 subproject object as a dependency/main.c b/test cases/failing/128 subproject object as a dependency/main.c
new file mode 100644
index 0000000..78f2de1
--- /dev/null
+++ b/test cases/failing/128 subproject object as a dependency/main.c
@@ -0,0 +1 @@
+int main(void) { return 0; }
diff --git a/test cases/failing/128 subproject object as a dependency/meson.build b/test cases/failing/128 subproject object as a dependency/meson.build
new file mode 100644
index 0000000..0114b9a
--- /dev/null
+++ b/test cases/failing/128 subproject object as a dependency/meson.build
@@ -0,0 +1,4 @@
+project('test', 'c')
+
+executable(
+ 'main', 'main.c', dependencies: subproject('sub'))
diff --git a/test cases/failing/128 subproject object as a dependency/subprojects/sub/meson.build b/test cases/failing/128 subproject object as a dependency/subprojects/sub/meson.build
new file mode 100644
index 0000000..0adfd6a
--- /dev/null
+++ b/test cases/failing/128 subproject object as a dependency/subprojects/sub/meson.build
@@ -0,0 +1 @@
+project('sub')
diff --git a/test cases/failing/128 subproject object as a dependency/test.json b/test cases/failing/128 subproject object as a dependency/test.json
new file mode 100644
index 0000000..b04bf37
--- /dev/null
+++ b/test cases/failing/128 subproject object as a dependency/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/128 subproject object as a dependency/meson.build:3:0: ERROR: Tried to use subproject object as a dependency."
+ }
+ ]
+}
diff --git a/test cases/failing/129 generator host binary/exe.c b/test cases/failing/129 generator host binary/exe.c
new file mode 100644
index 0000000..78f2de1
--- /dev/null
+++ b/test cases/failing/129 generator host binary/exe.c
@@ -0,0 +1 @@
+int main(void) { return 0; }
diff --git a/test cases/failing/129 generator host binary/lib.in b/test cases/failing/129 generator host binary/lib.in
new file mode 100644
index 0000000..d0b6ab7
--- /dev/null
+++ b/test cases/failing/129 generator host binary/lib.in
@@ -0,0 +1 @@
+int foo(void) { return 7; }
diff --git a/test cases/failing/129 generator host binary/meson.build b/test cases/failing/129 generator host binary/meson.build
new file mode 100644
index 0000000..fc1f9be
--- /dev/null
+++ b/test cases/failing/129 generator host binary/meson.build
@@ -0,0 +1,14 @@
+project('generator host binary no exe_wrapper')
+
+if meson.can_run_host_binaries()
+ error('MESON_SKIP_TEST: test requires that build machine cannot run host binaries')
+endif
+
+add_languages('c', native : false)
+
+exe = executable('exe', 'exe.c', native : false)
+
+gen = generator(exe, output : '@BASENAME@.c', arguments : ['@INPUT@', '@OUTPU@'])
+foo = gen.process('lib.in')
+
+library('foo', foo)
diff --git a/test cases/failing/129 generator host binary/test.json b/test cases/failing/129 generator host binary/test.json
new file mode 100644
index 0000000..7e354d6
--- /dev/null
+++ b/test cases/failing/129 generator host binary/test.json
@@ -0,0 +1,5 @@
+{
+ "stdout": [
+ { "line": "ERROR: An exe_wrapper is needed but was not found. Please define one in cross file and check the command and/or add it to PATH." }
+ ]
+}
diff --git a/test cases/failing/13 array arithmetic/meson.build b/test cases/failing/13 array arithmetic/meson.build
new file mode 100644
index 0000000..f43f81c
--- /dev/null
+++ b/test cases/failing/13 array arithmetic/meson.build
@@ -0,0 +1,3 @@
+project('array arithmetic')
+
+foo = ['a', 'b'] * 3
diff --git a/test cases/failing/13 array arithmetic/test.json b/test cases/failing/13 array arithmetic/test.json
new file mode 100644
index 0000000..8904775
--- /dev/null
+++ b/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: Object <[ArrayHolder] holds [list]: ['a', 'b']> of type array does not support the `*` operator."
+ }
+ ]
+}
diff --git a/test cases/failing/14 invalid option name/meson.build b/test cases/failing/14 invalid option name/meson.build
new file mode 100644
index 0000000..6312312
--- /dev/null
+++ b/test cases/failing/14 invalid option name/meson.build
@@ -0,0 +1 @@
+project('foo')
diff --git a/test cases/failing/14 invalid option name/meson_options.txt b/test cases/failing/14 invalid option name/meson_options.txt
new file mode 100644
index 0000000..aab6ae8
--- /dev/null
+++ b/test cases/failing/14 invalid option name/meson_options.txt
@@ -0,0 +1 @@
+option('invalid:name', type : 'boolean', value : false)
diff --git a/test cases/failing/14 invalid option name/test.json b/test cases/failing/14 invalid option name/test.json
new file mode 100644
index 0000000..71e685d
--- /dev/null
+++ b/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/test cases/failing/15 kwarg before arg/meson.build b/test cases/failing/15 kwarg before arg/meson.build
new file mode 100644
index 0000000..f07d950
--- /dev/null
+++ b/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/test cases/failing/15 kwarg before arg/prog.c b/test cases/failing/15 kwarg before arg/prog.c
new file mode 100644
index 0000000..0314ff1
--- /dev/null
+++ b/test cases/failing/15 kwarg before arg/prog.c
@@ -0,0 +1 @@
+int main(int argc, char **argv) { return 0; }
diff --git a/test cases/failing/15 kwarg before arg/test.json b/test cases/failing/15 kwarg before arg/test.json
new file mode 100644
index 0000000..c7f72c3
--- /dev/null
+++ b/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/test cases/failing/16 extract from subproject/main.c b/test cases/failing/16 extract from subproject/main.c
new file mode 100644
index 0000000..6c8ecae
--- /dev/null
+++ b/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/test cases/failing/16 extract from subproject/meson.build b/test cases/failing/16 extract from subproject/meson.build
new file mode 100644
index 0000000..286aaa1
--- /dev/null
+++ b/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/test cases/failing/16 extract from subproject/subprojects/sub_project/meson.build b/test cases/failing/16 extract from subproject/subprojects/sub_project/meson.build
new file mode 100644
index 0000000..0810df5
--- /dev/null
+++ b/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/test cases/failing/16 extract from subproject/subprojects/sub_project/sub_lib.c b/test cases/failing/16 extract from subproject/subprojects/sub_project/sub_lib.c
new file mode 100644
index 0000000..be3c9aa
--- /dev/null
+++ b/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/test cases/failing/16 extract from subproject/test.json b/test cases/failing/16 extract from subproject/test.json
new file mode 100644
index 0000000..2e32904
--- /dev/null
+++ b/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/test cases/failing/17 same target/file.c b/test cases/failing/17 same target/file.c
new file mode 100644
index 0000000..7412372
--- /dev/null
+++ b/test cases/failing/17 same target/file.c
@@ -0,0 +1 @@
+int func() { return 0; }
diff --git a/test cases/failing/17 same target/meson.build b/test cases/failing/17 same target/meson.build
new file mode 100644
index 0000000..ee586d0
--- /dev/null
+++ b/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/test cases/failing/17 same target/test.json b/test cases/failing/17 same target/test.json
new file mode 100644
index 0000000..0005ba4
--- /dev/null
+++ b/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/test cases/failing/18 wrong plusassign/meson.build b/test cases/failing/18 wrong plusassign/meson.build
new file mode 100644
index 0000000..af7727a
--- /dev/null
+++ b/test cases/failing/18 wrong plusassign/meson.build
@@ -0,0 +1,3 @@
+project('false plusassign')
+
+3 += 4
diff --git a/test cases/failing/18 wrong plusassign/test.json b/test cases/failing/18 wrong plusassign/test.json
new file mode 100644
index 0000000..c698f85
--- /dev/null
+++ b/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/test cases/failing/19 target clash/clash.c b/test cases/failing/19 target clash/clash.c
new file mode 100644
index 0000000..2daa06c
--- /dev/null
+++ b/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/test cases/failing/19 target clash/meson.build b/test cases/failing/19 target clash/meson.build
new file mode 100644
index 0000000..4fd0934
--- /dev/null
+++ b/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/test cases/failing/19 target clash/test.json b/test cases/failing/19 target clash/test.json
new file mode 100644
index 0000000..d22b894
--- /dev/null
+++ b/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/test cases/failing/2 missing file/meson.build b/test cases/failing/2 missing file/meson.build
new file mode 100644
index 0000000..6b9133d
--- /dev/null
+++ b/test cases/failing/2 missing file/meson.build
@@ -0,0 +1,3 @@
+project('missing file', 'c')
+
+executable('prog', 'missing.c')
diff --git a/test cases/failing/2 missing file/test.json b/test cases/failing/2 missing file/test.json
new file mode 100644
index 0000000..b95b8b0
--- /dev/null
+++ b/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/test cases/failing/20 version/meson.build b/test cases/failing/20 version/meson.build
new file mode 100644
index 0000000..d25a395
--- /dev/null
+++ b/test cases/failing/20 version/meson.build
@@ -0,0 +1 @@
+project('version mismatch', meson_version : '>100.0.0')
diff --git a/test cases/failing/20 version/test.json b/test cases/failing/20 version/test.json
new file mode 100644
index 0000000..f330624
--- /dev/null
+++ b/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/test cases/failing/21 subver/meson.build b/test cases/failing/21 subver/meson.build
new file mode 100644
index 0000000..ea0f914
--- /dev/null
+++ b/test cases/failing/21 subver/meson.build
@@ -0,0 +1,3 @@
+project('master')
+
+x = subproject('foo', version : '>1.0.0')
diff --git a/test cases/failing/21 subver/subprojects/foo/meson.build b/test cases/failing/21 subver/subprojects/foo/meson.build
new file mode 100644
index 0000000..615ee92
--- /dev/null
+++ b/test cases/failing/21 subver/subprojects/foo/meson.build
@@ -0,0 +1 @@
+project('foo', version : '1.0.0')
diff --git a/test cases/failing/21 subver/test.json b/test cases/failing/21 subver/test.json
new file mode 100644
index 0000000..a197b36
--- /dev/null
+++ b/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/test cases/failing/22 assert/meson.build b/test cases/failing/22 assert/meson.build
new file mode 100644
index 0000000..45cff07
--- /dev/null
+++ b/test cases/failing/22 assert/meson.build
@@ -0,0 +1,3 @@
+project('failing assert')
+
+assert(false, 'I am fail.')
diff --git a/test cases/failing/22 assert/test.json b/test cases/failing/22 assert/test.json
new file mode 100644
index 0000000..edae999
--- /dev/null
+++ b/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/test cases/failing/23 rel testdir/meson.build b/test cases/failing/23 rel testdir/meson.build
new file mode 100644
index 0000000..c10558b
--- /dev/null
+++ b/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/test cases/failing/23 rel testdir/simple.c b/test cases/failing/23 rel testdir/simple.c
new file mode 100644
index 0000000..11b7fad
--- /dev/null
+++ b/test cases/failing/23 rel testdir/simple.c
@@ -0,0 +1,3 @@
+int main(int argc, char **argv) {
+ return 0;
+}
diff --git a/test cases/failing/23 rel testdir/test.json b/test cases/failing/23 rel testdir/test.json
new file mode 100644
index 0000000..bc80bc6
--- /dev/null
+++ b/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: test keyword argument \"workdir\" must be an absolute path"
+ }
+ ]
+}
diff --git a/test cases/failing/24 int conversion/meson.build b/test cases/failing/24 int conversion/meson.build
new file mode 100644
index 0000000..8db72f3
--- /dev/null
+++ b/test cases/failing/24 int conversion/meson.build
@@ -0,0 +1,3 @@
+project('int conversion')
+
+'notanumber'.to_int()
diff --git a/test cases/failing/24 int conversion/test.json b/test cases/failing/24 int conversion/test.json
new file mode 100644
index 0000000..e749928
--- /dev/null
+++ b/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/test cases/failing/25 badlang/meson.build b/test cases/failing/25 badlang/meson.build
new file mode 100644
index 0000000..a31059b
--- /dev/null
+++ b/test cases/failing/25 badlang/meson.build
@@ -0,0 +1,3 @@
+project('badlang')
+
+add_languages('nonexisting')
diff --git a/test cases/failing/25 badlang/test.json b/test cases/failing/25 badlang/test.json
new file mode 100644
index 0000000..0b23fd7
--- /dev/null
+++ b/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/test cases/failing/26 output subdir/foo.in b/test cases/failing/26 output subdir/foo.in
new file mode 100644
index 0000000..3d1bf19
--- /dev/null
+++ b/test cases/failing/26 output subdir/foo.in
@@ -0,0 +1 @@
+Nothing here.
diff --git a/test cases/failing/26 output subdir/meson.build b/test cases/failing/26 output subdir/meson.build
new file mode 100644
index 0000000..c4bd806
--- /dev/null
+++ b/test cases/failing/26 output subdir/meson.build
@@ -0,0 +1,5 @@
+project('outdir path')
+
+configure_file(input : 'foo.in',
+ output : 'subdir/foo',
+ copy: true)
diff --git a/test cases/failing/26 output subdir/subdir/dummy.txt b/test cases/failing/26 output subdir/subdir/dummy.txt
new file mode 100644
index 0000000..7e907f1
--- /dev/null
+++ b/test cases/failing/26 output subdir/subdir/dummy.txt
@@ -0,0 +1 @@
+I'm only here because Git is stupid about empty dirs.
diff --git a/test cases/failing/26 output subdir/test.json b/test cases/failing/26 output subdir/test.json
new file mode 100644
index 0000000..df09726
--- /dev/null
+++ b/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: configure_file keyword argument \"output\" Output 'subdir/foo' must not contain a path segment."
+ }
+ ]
+}
diff --git a/test cases/failing/27 noprog use/meson.build b/test cases/failing/27 noprog use/meson.build
new file mode 100644
index 0000000..af31ece
--- /dev/null
+++ b/test cases/failing/27 noprog use/meson.build
@@ -0,0 +1,9 @@
+project('using not found exe')
+
+nope = find_program('nonexisting', required : false)
+
+custom_target( 'aa',
+ input: 'meson.build',
+ output: 'foobar',
+ command: [nope, '@INPUT@', '@OUTPUT@']
+)
diff --git a/test cases/failing/27 noprog use/test.json b/test cases/failing/27 noprog use/test.json
new file mode 100644
index 0000000..b84562e
--- /dev/null
+++ b/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/test cases/failing/28 no crossprop/meson.build b/test cases/failing/28 no crossprop/meson.build
new file mode 100644
index 0000000..9152077
--- /dev/null
+++ b/test cases/failing/28 no crossprop/meson.build
@@ -0,0 +1,3 @@
+project('no crossprop')
+
+message(meson.get_cross_property('nonexisting'))
diff --git a/test cases/failing/28 no crossprop/test.json b/test cases/failing/28 no crossprop/test.json
new file mode 100644
index 0000000..6fb9dce
--- /dev/null
+++ b/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/test cases/failing/29 nested ternary/meson.build b/test cases/failing/29 nested ternary/meson.build
new file mode 100644
index 0000000..76364ce
--- /dev/null
+++ b/test cases/failing/29 nested ternary/meson.build
@@ -0,0 +1,3 @@
+project('nested ternary')
+
+x = true ? (false ? 1 : 0) : 2
diff --git a/test cases/failing/29 nested ternary/test.json b/test cases/failing/29 nested ternary/test.json
new file mode 100644
index 0000000..ba05013
--- /dev/null
+++ b/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/test cases/failing/3 missing subdir/meson.build b/test cases/failing/3 missing subdir/meson.build
new file mode 100644
index 0000000..9301c1e
--- /dev/null
+++ b/test cases/failing/3 missing subdir/meson.build
@@ -0,0 +1,3 @@
+project('subdir')
+
+subdir('missing')
diff --git a/test cases/failing/3 missing subdir/test.json b/test cases/failing/3 missing subdir/test.json
new file mode 100644
index 0000000..562de25
--- /dev/null
+++ b/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/test cases/failing/30 invalid man extension/foo.a1 b/test cases/failing/30 invalid man extension/foo.a1
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test cases/failing/30 invalid man extension/foo.a1
diff --git a/test cases/failing/30 invalid man extension/meson.build b/test cases/failing/30 invalid man extension/meson.build
new file mode 100644
index 0000000..b3694d5
--- /dev/null
+++ b/test cases/failing/30 invalid man extension/meson.build
@@ -0,0 +1,2 @@
+project('man install')
+m1 = install_man('foo.a1')
diff --git a/test cases/failing/30 invalid man extension/test.json b/test cases/failing/30 invalid man extension/test.json
new file mode 100644
index 0000000..3e5f45d
--- /dev/null
+++ b/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/test cases/failing/31 no man extension/foo b/test cases/failing/31 no man extension/foo
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test cases/failing/31 no man extension/foo
diff --git a/test cases/failing/31 no man extension/meson.build b/test cases/failing/31 no man extension/meson.build
new file mode 100644
index 0000000..33fdd3e
--- /dev/null
+++ b/test cases/failing/31 no man extension/meson.build
@@ -0,0 +1,2 @@
+project('man install')
+m1 = install_man('foo')
diff --git a/test cases/failing/31 no man extension/test.json b/test cases/failing/31 no man extension/test.json
new file mode 100644
index 0000000..0972da1
--- /dev/null
+++ b/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/test cases/failing/32 exe static shared/meson.build b/test cases/failing/32 exe static shared/meson.build
new file mode 100644
index 0000000..2ae5125
--- /dev/null
+++ b/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/test cases/failing/32 exe static shared/prog.c b/test cases/failing/32 exe static shared/prog.c
new file mode 100644
index 0000000..26603b6
--- /dev/null
+++ b/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/test cases/failing/32 exe static shared/shlib2.c b/test cases/failing/32 exe static shared/shlib2.c
new file mode 100644
index 0000000..5b68843
--- /dev/null
+++ b/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/test cases/failing/32 exe static shared/stat.c b/test cases/failing/32 exe static shared/stat.c
new file mode 100644
index 0000000..56ec66c
--- /dev/null
+++ b/test cases/failing/32 exe static shared/stat.c
@@ -0,0 +1,3 @@
+int statlibfunc() {
+ return 42;
+}
diff --git a/test cases/failing/32 exe static shared/test.json b/test cases/failing/32 exe static shared/test.json
new file mode 100644
index 0000000..51d3804
--- /dev/null
+++ b/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/test cases/failing/33 non-root subproject/meson.build b/test cases/failing/33 non-root subproject/meson.build
new file mode 100644
index 0000000..65b1d23
--- /dev/null
+++ b/test cases/failing/33 non-root subproject/meson.build
@@ -0,0 +1,3 @@
+project('non-root subproject')
+
+subdir('some')
diff --git a/test cases/failing/33 non-root subproject/some/meson.build b/test cases/failing/33 non-root subproject/some/meson.build
new file mode 100644
index 0000000..d82f451
--- /dev/null
+++ b/test cases/failing/33 non-root subproject/some/meson.build
@@ -0,0 +1 @@
+dependency('definitely-doesnt-exist', fallback : ['someproj', 'some_dep'])
diff --git a/test cases/failing/33 non-root subproject/test.json b/test cases/failing/33 non-root subproject/test.json
new file mode 100644
index 0000000..52baf6a
--- /dev/null
+++ b/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/test cases/failing/34 dependency not-required then required/meson.build b/test cases/failing/34 dependency not-required then required/meson.build
new file mode 100644
index 0000000..54f5a58
--- /dev/null
+++ b/test cases/failing/34 dependency not-required then required/meson.build
@@ -0,0 +1,4 @@
+project('dep-test', version : '1.0')
+
+foo_dep = dependency('foo-bar-xyz-12.3', required : false)
+bar_dep = dependency('foo-bar-xyz-12.3')
diff --git a/test cases/failing/34 dependency not-required then required/test.json b/test cases/failing/34 dependency not-required then required/test.json
new file mode 100644
index 0000000..3cf35f5
--- /dev/null
+++ b/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/test cases/failing/35 project argument after target/exe.c b/test cases/failing/35 project argument after target/exe.c
new file mode 100644
index 0000000..11b7fad
--- /dev/null
+++ b/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/test cases/failing/35 project argument after target/meson.build b/test cases/failing/35 project argument after target/meson.build
new file mode 100644
index 0000000..5402c67
--- /dev/null
+++ b/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/test cases/failing/35 project argument after target/test.json b/test cases/failing/35 project argument after target/test.json
new file mode 100644
index 0000000..f5efd9b
--- /dev/null
+++ b/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/test cases/failing/36 pkgconfig dependency impossible conditions/meson.build b/test cases/failing/36 pkgconfig dependency impossible conditions/meson.build
new file mode 100644
index 0000000..874b581
--- /dev/null
+++ b/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/test cases/failing/36 pkgconfig dependency impossible conditions/test.json b/test cases/failing/36 pkgconfig dependency impossible conditions/test.json
new file mode 100644
index 0000000..6deddbe
--- /dev/null
+++ b/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/test cases/failing/37 has function external dependency/meson.build b/test cases/failing/37 has function external dependency/meson.build
new file mode 100644
index 0000000..45a3bc2
--- /dev/null
+++ b/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/test cases/failing/37 has function external dependency/mylib.c b/test cases/failing/37 has function external dependency/mylib.c
new file mode 100644
index 0000000..d9fbd34
--- /dev/null
+++ b/test cases/failing/37 has function external dependency/mylib.c
@@ -0,0 +1 @@
+int testfunc(void) { return 0; }
diff --git a/test cases/failing/37 has function external dependency/test.json b/test cases/failing/37 has function external dependency/test.json
new file mode 100644
index 0000000..81d6f91
--- /dev/null
+++ b/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/test cases/failing/38 prefix absolute/meson.build b/test cases/failing/38 prefix absolute/meson.build
new file mode 100644
index 0000000..6d0114b
--- /dev/null
+++ b/test cases/failing/38 prefix absolute/meson.build
@@ -0,0 +1,2 @@
+project('prefix-abs',
+ default_options : ['prefix=some/path/notabs'])
diff --git a/test cases/failing/38 prefix absolute/test.json b/test cases/failing/38 prefix absolute/test.json
new file mode 100644
index 0000000..859906c
--- /dev/null
+++ b/test cases/failing/38 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/38 prefix absolute/meson.build:1:0: ERROR: prefix value 'some/path/notabs' must be an absolute path"
+ }
+ ]
+}
diff --git a/test cases/failing/39 kwarg assign/dummy.c b/test cases/failing/39 kwarg assign/dummy.c
new file mode 100644
index 0000000..16fcdd9
--- /dev/null
+++ b/test cases/failing/39 kwarg assign/dummy.c
@@ -0,0 +1,3 @@
+const char* dummy() {
+ return "I do nothing.";
+}
diff --git a/test cases/failing/39 kwarg assign/meson.build b/test cases/failing/39 kwarg assign/meson.build
new file mode 100644
index 0000000..7d42521
--- /dev/null
+++ b/test cases/failing/39 kwarg assign/meson.build
@@ -0,0 +1,3 @@
+project('assign in kwarg', 'c')
+
+executable('prog', 'dummy.c', args = 'prog.c')
diff --git a/test cases/failing/39 kwarg assign/prog.c b/test cases/failing/39 kwarg assign/prog.c
new file mode 100644
index 0000000..11b7fad
--- /dev/null
+++ b/test cases/failing/39 kwarg assign/prog.c
@@ -0,0 +1,3 @@
+int main(int argc, char **argv) {
+ return 0;
+}
diff --git a/test cases/failing/39 kwarg assign/test.json b/test cases/failing/39 kwarg assign/test.json
new file mode 100644
index 0000000..8fd9d0f
--- /dev/null
+++ b/test cases/failing/39 kwarg assign/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/39 kwarg assign/meson.build:3:0: ERROR: Tried to assign values inside an argument list."
+ }
+ ]
+}
diff --git a/test cases/failing/4 missing meson.build/meson.build b/test cases/failing/4 missing meson.build/meson.build
new file mode 100644
index 0000000..20f754c
--- /dev/null
+++ b/test cases/failing/4 missing meson.build/meson.build
@@ -0,0 +1,3 @@
+project('missing meson.build')
+
+subdir('subdir')
diff --git a/test cases/failing/4 missing meson.build/subdir/dummy.txt b/test cases/failing/4 missing meson.build/subdir/dummy.txt
new file mode 100644
index 0000000..03327bd
--- /dev/null
+++ b/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/test cases/failing/4 missing meson.build/test.json b/test cases/failing/4 missing meson.build/test.json
new file mode 100644
index 0000000..3857090
--- /dev/null
+++ b/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/test cases/failing/40 custom target plainname many inputs/1.txt b/test cases/failing/40 custom target plainname many inputs/1.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/test cases/failing/40 custom target plainname many inputs/1.txt
@@ -0,0 +1 @@
+1
diff --git a/test cases/failing/40 custom target plainname many inputs/2.txt b/test cases/failing/40 custom target plainname many inputs/2.txt
new file mode 100644
index 0000000..0cfbf08
--- /dev/null
+++ b/test cases/failing/40 custom target plainname many inputs/2.txt
@@ -0,0 +1 @@
+2
diff --git a/test cases/failing/40 custom target plainname many inputs/catfiles.py b/test cases/failing/40 custom target plainname many inputs/catfiles.py
new file mode 100644
index 0000000..1c53e24
--- /dev/null
+++ b/test cases/failing/40 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/test cases/failing/40 custom target plainname many inputs/meson.build b/test cases/failing/40 custom target plainname many inputs/meson.build
new file mode 100644
index 0000000..8513bf8
--- /dev/null
+++ b/test cases/failing/40 custom target plainname many inputs/meson.build
@@ -0,0 +1,8 @@
+project('plain name many inputs')
+
+catfiles = find_program('catfiles.py')
+
+custom_target('plainname-inputs',
+ input : ['1.txt', '2.txt'],
+ output : '@PLAINNAME@.dat',
+ command : [catfiles, '@INPUT@', '@OUTPUT@'])
diff --git a/test cases/failing/40 custom target plainname many inputs/test.json b/test cases/failing/40 custom target plainname many inputs/test.json
new file mode 100644
index 0000000..f5c3abf
--- /dev/null
+++ b/test cases/failing/40 custom target plainname many inputs/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/40 custom target plainname many inputs/meson.build:5:0: ERROR: custom_target: output cannot contain \"@PLAINNAME@\" or \"@BASENAME@\" when there is more than one input (we can't know which to use)"
+ }
+ ]
+}
diff --git a/test cases/failing/41 custom target outputs not matching install_dirs/generator.py b/test cases/failing/41 custom target outputs not matching install_dirs/generator.py
new file mode 100755
index 0000000..4ac6179
--- /dev/null
+++ b/test cases/failing/41 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/test cases/failing/41 custom target outputs not matching install_dirs/meson.build b/test cases/failing/41 custom target outputs not matching install_dirs/meson.build
new file mode 100644
index 0000000..ed99dba
--- /dev/null
+++ b/test cases/failing/41 custom target outputs not matching install_dirs/meson.build
@@ -0,0 +1,13 @@
+project('outputs not matching install_dirs')
+
+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/test cases/failing/41 custom target outputs not matching install_dirs/test.json b/test cases/failing/41 custom target outputs not matching install_dirs/test.json
new file mode 100644
index 0000000..f9e2ba7
--- /dev/null
+++ b/test cases/failing/41 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/test cases/failing/42 project name colon/meson.build b/test cases/failing/42 project name colon/meson.build
new file mode 100644
index 0000000..53e947e
--- /dev/null
+++ b/test cases/failing/42 project name colon/meson.build
@@ -0,0 +1 @@
+project('name with :')
diff --git a/test cases/failing/42 project name colon/test.json b/test cases/failing/42 project name colon/test.json
new file mode 100644
index 0000000..c3b880e
--- /dev/null
+++ b/test cases/failing/42 project name colon/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/42 project name colon/meson.build:1:0: ERROR: Project name 'name with :' must not contain ':'"
+ }
+ ]
+}
diff --git a/test cases/failing/43 abs subdir/bob/meson.build b/test cases/failing/43 abs subdir/bob/meson.build
new file mode 100644
index 0000000..7bbf4b2
--- /dev/null
+++ b/test cases/failing/43 abs subdir/bob/meson.build
@@ -0,0 +1,2 @@
+# This file is never reached.
+x = 3
diff --git a/test cases/failing/43 abs subdir/meson.build b/test cases/failing/43 abs subdir/meson.build
new file mode 100644
index 0000000..a8534d0
--- /dev/null
+++ b/test cases/failing/43 abs subdir/meson.build
@@ -0,0 +1,5 @@
+project('abs subdir')
+
+# 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/test cases/failing/43 abs subdir/test.json b/test cases/failing/43 abs subdir/test.json
new file mode 100644
index 0000000..201ed44
--- /dev/null
+++ b/test cases/failing/43 abs subdir/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/43 abs subdir/meson.build:5:0: ERROR: Subdir argument must be a relative path."
+ }
+ ]
+}
diff --git a/test cases/failing/44 abspath to srcdir/meson.build b/test cases/failing/44 abspath to srcdir/meson.build
new file mode 100644
index 0000000..78c6124
--- /dev/null
+++ b/test cases/failing/44 abspath to srcdir/meson.build
@@ -0,0 +1,3 @@
+project('meson')
+
+include_directories(meson.current_source_dir())
diff --git a/test cases/failing/44 abspath to srcdir/test.json b/test cases/failing/44 abspath to srcdir/test.json
new file mode 100644
index 0000000..c64ecfb
--- /dev/null
+++ b/test cases/failing/44 abspath to srcdir/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/44 abspath to srcdir/meson.build:3:0: ERROR: Tried to form an absolute path to a dir in the source tree."
+ }
+ ]
+}
diff --git a/test cases/failing/45 pkgconfig variables reserved/meson.build b/test cases/failing/45 pkgconfig variables reserved/meson.build
new file mode 100644
index 0000000..82ae995
--- /dev/null
+++ b/test cases/failing/45 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/test cases/failing/45 pkgconfig variables reserved/simple.c b/test cases/failing/45 pkgconfig variables reserved/simple.c
new file mode 100644
index 0000000..e8a6d83
--- /dev/null
+++ b/test cases/failing/45 pkgconfig variables reserved/simple.c
@@ -0,0 +1,5 @@
+#include"simple.h"
+
+int simple_function() {
+ return 42;
+}
diff --git a/test cases/failing/45 pkgconfig variables reserved/simple.h b/test cases/failing/45 pkgconfig variables reserved/simple.h
new file mode 100644
index 0000000..bb52e6d
--- /dev/null
+++ b/test cases/failing/45 pkgconfig variables reserved/simple.h
@@ -0,0 +1,6 @@
+#ifndef SIMPLE_H_
+#define SIMPLE_H_
+
+int simple_function();
+
+#endif
diff --git a/test cases/failing/45 pkgconfig variables reserved/test.json b/test cases/failing/45 pkgconfig variables reserved/test.json
new file mode 100644
index 0000000..853eb82
--- /dev/null
+++ b/test cases/failing/45 pkgconfig variables reserved/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/45 pkgconfig variables reserved/meson.build:8:5: ERROR: Variable \"prefix\" is reserved"
+ }
+ ]
+}
diff --git a/test cases/failing/46 pkgconfig variables zero length/meson.build b/test cases/failing/46 pkgconfig variables zero length/meson.build
new file mode 100644
index 0000000..65d3344
--- /dev/null
+++ b/test cases/failing/46 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/test cases/failing/46 pkgconfig variables zero length/simple.c b/test cases/failing/46 pkgconfig variables zero length/simple.c
new file mode 100644
index 0000000..e8a6d83
--- /dev/null
+++ b/test cases/failing/46 pkgconfig variables zero length/simple.c
@@ -0,0 +1,5 @@
+#include"simple.h"
+
+int simple_function() {
+ return 42;
+}
diff --git a/test cases/failing/46 pkgconfig variables zero length/simple.h b/test cases/failing/46 pkgconfig variables zero length/simple.h
new file mode 100644
index 0000000..bb52e6d
--- /dev/null
+++ b/test cases/failing/46 pkgconfig variables zero length/simple.h
@@ -0,0 +1,6 @@
+#ifndef SIMPLE_H_
+#define SIMPLE_H_
+
+int simple_function();
+
+#endif
diff --git a/test cases/failing/46 pkgconfig variables zero length/test.json b/test cases/failing/46 pkgconfig variables zero length/test.json
new file mode 100644
index 0000000..b174065
--- /dev/null
+++ b/test cases/failing/46 pkgconfig variables zero length/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/46 pkgconfig variables zero length/meson.build:8:5: ERROR: pkgconfig.generate keyword argument \"variables\" empty variable name"
+ }
+ ]
+}
diff --git a/test cases/failing/47 pkgconfig variables zero length value/meson.build b/test cases/failing/47 pkgconfig variables zero length value/meson.build
new file mode 100644
index 0000000..33977b2
--- /dev/null
+++ b/test cases/failing/47 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/test cases/failing/47 pkgconfig variables zero length value/simple.c b/test cases/failing/47 pkgconfig variables zero length value/simple.c
new file mode 100644
index 0000000..e8a6d83
--- /dev/null
+++ b/test cases/failing/47 pkgconfig variables zero length value/simple.c
@@ -0,0 +1,5 @@
+#include"simple.h"
+
+int simple_function() {
+ return 42;
+}
diff --git a/test cases/failing/47 pkgconfig variables zero length value/simple.h b/test cases/failing/47 pkgconfig variables zero length value/simple.h
new file mode 100644
index 0000000..bb52e6d
--- /dev/null
+++ b/test cases/failing/47 pkgconfig variables zero length value/simple.h
@@ -0,0 +1,6 @@
+#ifndef SIMPLE_H_
+#define SIMPLE_H_
+
+int simple_function();
+
+#endif
diff --git a/test cases/failing/47 pkgconfig variables zero length value/test.json b/test cases/failing/47 pkgconfig variables zero length value/test.json
new file mode 100644
index 0000000..0be5725
--- /dev/null
+++ b/test cases/failing/47 pkgconfig variables zero length value/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/47 pkgconfig variables zero length value/meson.build:8:5: ERROR: pkgconfig.generate keyword argument \"variables\" empty variable value"
+ }
+ ]
+}
diff --git a/test cases/failing/48 pkgconfig variables not key value/meson.build b/test cases/failing/48 pkgconfig variables not key value/meson.build
new file mode 100644
index 0000000..02fa737
--- /dev/null
+++ b/test cases/failing/48 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/test cases/failing/48 pkgconfig variables not key value/simple.c b/test cases/failing/48 pkgconfig variables not key value/simple.c
new file mode 100644
index 0000000..e8a6d83
--- /dev/null
+++ b/test cases/failing/48 pkgconfig variables not key value/simple.c
@@ -0,0 +1,5 @@
+#include"simple.h"
+
+int simple_function() {
+ return 42;
+}
diff --git a/test cases/failing/48 pkgconfig variables not key value/simple.h b/test cases/failing/48 pkgconfig variables not key value/simple.h
new file mode 100644
index 0000000..bb52e6d
--- /dev/null
+++ b/test cases/failing/48 pkgconfig variables not key value/simple.h
@@ -0,0 +1,6 @@
+#ifndef SIMPLE_H_
+#define SIMPLE_H_
+
+int simple_function();
+
+#endif
diff --git a/test cases/failing/48 pkgconfig variables not key value/test.json b/test cases/failing/48 pkgconfig variables not key value/test.json
new file mode 100644
index 0000000..96422a9
--- /dev/null
+++ b/test cases/failing/48 pkgconfig variables not key value/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/48 pkgconfig variables not key value/meson.build:8:5: ERROR: pkgconfig.generate keyword argument \"variables\" variable 'this_should_be_key_value' must have a value separated by equals sign."
+ }
+ ]
+}
diff --git a/test cases/failing/49 executable comparison/meson.build b/test cases/failing/49 executable comparison/meson.build
new file mode 100644
index 0000000..041bcf3
--- /dev/null
+++ b/test cases/failing/49 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/test cases/failing/49 executable comparison/prog.c b/test cases/failing/49 executable comparison/prog.c
new file mode 100644
index 0000000..0314ff1
--- /dev/null
+++ b/test cases/failing/49 executable comparison/prog.c
@@ -0,0 +1 @@
+int main(int argc, char **argv) { return 0; }
diff --git a/test cases/failing/49 executable comparison/test.json b/test cases/failing/49 executable comparison/test.json
new file mode 100644
index 0000000..a37002e
--- /dev/null
+++ b/test cases/failing/49 executable comparison/test.json
@@ -0,0 +1,8 @@
+{
+ "stdout": [
+ {
+ "match": "re",
+ "line": "test cases/failing/49 executable comparison/meson.build:6:0: ERROR: Object <ExecutableHolder prog1@exe: prog1(.exe)?> of type Executable does not support the `<` operator."
+ }
+ ]
+}
diff --git a/test cases/failing/5 misplaced option/meson.build b/test cases/failing/5 misplaced option/meson.build
new file mode 100644
index 0000000..a992de5
--- /dev/null
+++ b/test cases/failing/5 misplaced option/meson.build
@@ -0,0 +1,3 @@
+project('misplaced option')
+
+option('dummy', type : 'string')
diff --git a/test cases/failing/5 misplaced option/test.json b/test cases/failing/5 misplaced option/test.json
new file mode 100644
index 0000000..12afdf0
--- /dev/null
+++ b/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/test cases/failing/50 inconsistent comparison/meson.build b/test cases/failing/50 inconsistent comparison/meson.build
new file mode 100644
index 0000000..237a157
--- /dev/null
+++ b/test cases/failing/50 inconsistent comparison/meson.build
@@ -0,0 +1,7 @@
+project('kwarg before arg')
+
+# 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/test cases/failing/50 inconsistent comparison/test.json b/test cases/failing/50 inconsistent comparison/test.json
new file mode 100644
index 0000000..171bfa6
--- /dev/null
+++ b/test cases/failing/50 inconsistent comparison/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/50 inconsistent comparison/meson.build:5:0: ERROR: Object <[ArrayHolder] holds [list]: []> of type array does not support the `<` operator."
+ }
+ ]
+}
diff --git a/test cases/failing/51 slashname/meson.build b/test cases/failing/51 slashname/meson.build
new file mode 100644
index 0000000..29fe1fc
--- /dev/null
+++ b/test cases/failing/51 slashname/meson.build
@@ -0,0 +1,11 @@
+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/test cases/failing/51 slashname/sub/meson.build b/test cases/failing/51 slashname/sub/meson.build
new file mode 100644
index 0000000..3baacf6
--- /dev/null
+++ b/test cases/failing/51 slashname/sub/meson.build
@@ -0,0 +1 @@
+pf = files('prog.c')
diff --git a/test cases/failing/51 slashname/sub/prog.c b/test cases/failing/51 slashname/sub/prog.c
new file mode 100644
index 0000000..722de0a
--- /dev/null
+++ b/test cases/failing/51 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/test cases/failing/51 slashname/test.json b/test cases/failing/51 slashname/test.json
new file mode 100644
index 0000000..39346a9
--- /dev/null
+++ b/test cases/failing/51 slashname/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/51 slashname/meson.build:9:0: ERROR: Target \"sub/prog\" has a path segment pointing to directory \"sub\". This is an error."
+ }
+ ]
+}
diff --git a/test cases/failing/52 reserved meson prefix/meson-foo/meson.build b/test cases/failing/52 reserved meson prefix/meson-foo/meson.build
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test cases/failing/52 reserved meson prefix/meson-foo/meson.build
diff --git a/test cases/failing/52 reserved meson prefix/meson.build b/test cases/failing/52 reserved meson prefix/meson.build
new file mode 100644
index 0000000..1339035
--- /dev/null
+++ b/test cases/failing/52 reserved meson prefix/meson.build
@@ -0,0 +1,3 @@
+project('test')
+
+subdir('meson-foo')
diff --git a/test cases/failing/52 reserved meson prefix/test.json b/test cases/failing/52 reserved meson prefix/test.json
new file mode 100644
index 0000000..707cd73
--- /dev/null
+++ b/test cases/failing/52 reserved meson prefix/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/52 reserved meson prefix/meson.build:3:0: ERROR: The \"meson-\" prefix is reserved and cannot be used for top-level subdir()."
+ }
+ ]
+}
diff --git a/test cases/failing/53 wrong shared crate type/foo.rs b/test cases/failing/53 wrong shared crate type/foo.rs
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test cases/failing/53 wrong shared crate type/foo.rs
diff --git a/test cases/failing/53 wrong shared crate type/meson.build b/test cases/failing/53 wrong shared crate type/meson.build
new file mode 100644
index 0000000..90020fa
--- /dev/null
+++ b/test cases/failing/53 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('mytest', 'foo.rs', rust_crate_type : 'staticlib')
diff --git a/test cases/failing/53 wrong shared crate type/test.json b/test cases/failing/53 wrong shared crate type/test.json
new file mode 100644
index 0000000..5faaece
--- /dev/null
+++ b/test cases/failing/53 wrong shared crate type/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/53 wrong shared crate type/meson.build:7:0: ERROR: Crate type \"staticlib\" invalid for dynamic libraries; must be \"dylib\", \"cdylib\", or \"proc-macro\""
+ }
+ ]
+}
diff --git a/test cases/failing/54 wrong static crate type/foo.rs b/test cases/failing/54 wrong static crate type/foo.rs
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test cases/failing/54 wrong static crate type/foo.rs
diff --git a/test cases/failing/54 wrong static crate type/meson.build b/test cases/failing/54 wrong static crate type/meson.build
new file mode 100644
index 0000000..179d7cd
--- /dev/null
+++ b/test cases/failing/54 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('mytest', 'foo.rs', rust_crate_type : 'cdylib')
diff --git a/test cases/failing/54 wrong static crate type/test.json b/test cases/failing/54 wrong static crate type/test.json
new file mode 100644
index 0000000..83ae5e1
--- /dev/null
+++ b/test cases/failing/54 wrong static crate type/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/54 wrong static crate type/meson.build:7:0: ERROR: Crate type \"cdylib\" invalid for static libraries; must be \"rlib\" or \"staticlib\""
+ }
+ ]
+}
diff --git a/test cases/failing/55 or on new line/meson.build b/test cases/failing/55 or on new line/meson.build
new file mode 100644
index 0000000..b0bd08e
--- /dev/null
+++ b/test cases/failing/55 or on new line/meson.build
@@ -0,0 +1,7 @@
+project('silent_or')
+
+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/test cases/failing/55 or on new line/meson_options.txt b/test cases/failing/55 or on new line/meson_options.txt
new file mode 100644
index 0000000..3302cf4
--- /dev/null
+++ b/test cases/failing/55 or on new line/meson_options.txt
@@ -0,0 +1 @@
+option('foo', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto')
diff --git a/test cases/failing/55 or on new line/test.json b/test cases/failing/55 or on new line/test.json
new file mode 100644
index 0000000..f1b8a67
--- /dev/null
+++ b/test cases/failing/55 or on new line/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/55 or on new line/meson.build:4:8: ERROR: Invalid or clause."
+ }
+ ]
+}
diff --git a/test cases/failing/56 link with executable/meson.build b/test cases/failing/56 link with executable/meson.build
new file mode 100644
index 0000000..186b3e5
--- /dev/null
+++ b/test cases/failing/56 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/test cases/failing/56 link with executable/module.c b/test cases/failing/56 link with executable/module.c
new file mode 100644
index 0000000..dc0124a
--- /dev/null
+++ b/test cases/failing/56 link with executable/module.c
@@ -0,0 +1,4 @@
+
+int func(void) {
+ return 42;
+}
diff --git a/test cases/failing/56 link with executable/prog.c b/test cases/failing/56 link with executable/prog.c
new file mode 100644
index 0000000..f3836d7
--- /dev/null
+++ b/test cases/failing/56 link with executable/prog.c
@@ -0,0 +1,5 @@
+int
+main (int argc, char **argv)
+{
+ return 0;
+}
diff --git a/test cases/failing/56 link with executable/test.json b/test cases/failing/56 link with executable/test.json
new file mode 100644
index 0000000..2288783
--- /dev/null
+++ b/test cases/failing/56 link with executable/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/56 link with executable/meson.build:4:0: ERROR: Link target 'prog' is not linkable."
+ }
+ ]
+}
diff --git a/test cases/failing/57 assign custom target index/meson.build b/test cases/failing/57 assign custom target index/meson.build
new file mode 100644
index 0000000..7f2a820
--- /dev/null
+++ b/test cases/failing/57 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/test cases/failing/57 assign custom target index/test.json b/test cases/failing/57 assign custom target index/test.json
new file mode 100644
index 0000000..392137a
--- /dev/null
+++ b/test cases/failing/57 assign custom target index/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/57 assign custom target index/meson.build:24:0: ERROR: Assignment target must be an id."
+ }
+ ]
+}
diff --git a/test cases/failing/58 getoption prefix/meson.build b/test cases/failing/58 getoption prefix/meson.build
new file mode 100644
index 0000000..8f85cff
--- /dev/null
+++ b/test cases/failing/58 getoption prefix/meson.build
@@ -0,0 +1,5 @@
+project('getopt prefix')
+
+subproject('abc')
+
+get_option('abc:foo')
diff --git a/test cases/failing/58 getoption prefix/subprojects/abc/meson.build b/test cases/failing/58 getoption prefix/subprojects/abc/meson.build
new file mode 100644
index 0000000..aa9c3df
--- /dev/null
+++ b/test cases/failing/58 getoption prefix/subprojects/abc/meson.build
@@ -0,0 +1 @@
+project('abc', 'c')
diff --git a/test cases/failing/58 getoption prefix/subprojects/abc/meson_options.txt b/test cases/failing/58 getoption prefix/subprojects/abc/meson_options.txt
new file mode 100644
index 0000000..89e624e
--- /dev/null
+++ b/test cases/failing/58 getoption prefix/subprojects/abc/meson_options.txt
@@ -0,0 +1 @@
+option('foo', type : 'boolean')
diff --git a/test cases/failing/58 getoption prefix/test.json b/test cases/failing/58 getoption prefix/test.json
new file mode 100644
index 0000000..630dcd9
--- /dev/null
+++ b/test cases/failing/58 getoption prefix/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/58 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/test cases/failing/59 bad option argument/meson.build b/test cases/failing/59 bad option argument/meson.build
new file mode 100644
index 0000000..5219cfb
--- /dev/null
+++ b/test cases/failing/59 bad option argument/meson.build
@@ -0,0 +1,3 @@
+project('bad option')
+
+get_option('name')
diff --git a/test cases/failing/59 bad option argument/meson_options.txt b/test cases/failing/59 bad option argument/meson_options.txt
new file mode 100644
index 0000000..de1fff6
--- /dev/null
+++ b/test cases/failing/59 bad option argument/meson_options.txt
@@ -0,0 +1 @@
+option('name', type : 'string', vaule : 'foo')
diff --git a/test cases/failing/59 bad option argument/test.json b/test cases/failing/59 bad option argument/test.json
new file mode 100644
index 0000000..3c5df1b
--- /dev/null
+++ b/test cases/failing/59 bad option argument/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/59 bad option argument/meson_options.txt:1:0: ERROR: option got unknown keyword arguments \"vaule\""
+ }
+ ]
+}
diff --git a/test cases/failing/6 missing incdir/meson.build b/test cases/failing/6 missing incdir/meson.build
new file mode 100644
index 0000000..eb5ba2a
--- /dev/null
+++ b/test cases/failing/6 missing incdir/meson.build
@@ -0,0 +1,3 @@
+project('missing incdir')
+
+inc = include_directories('nosuchdir')
diff --git a/test cases/failing/6 missing incdir/test.json b/test cases/failing/6 missing incdir/test.json
new file mode 100644
index 0000000..172d8a9
--- /dev/null
+++ b/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/test cases/failing/60 subproj filegrab/meson.build b/test cases/failing/60 subproj filegrab/meson.build
new file mode 100644
index 0000000..b5c484c
--- /dev/null
+++ b/test cases/failing/60 subproj filegrab/meson.build
@@ -0,0 +1,5 @@
+project('mainproj')
+
+# Try to grab a file from a parent project.
+
+subproject('a')
diff --git a/test cases/failing/60 subproj filegrab/prog.c b/test cases/failing/60 subproj filegrab/prog.c
new file mode 100644
index 0000000..0314ff1
--- /dev/null
+++ b/test cases/failing/60 subproj filegrab/prog.c
@@ -0,0 +1 @@
+int main(int argc, char **argv) { return 0; }
diff --git a/test cases/failing/60 subproj filegrab/subprojects/a/meson.build b/test cases/failing/60 subproj filegrab/subprojects/a/meson.build
new file mode 100644
index 0000000..80b9888
--- /dev/null
+++ b/test cases/failing/60 subproj filegrab/subprojects/a/meson.build
@@ -0,0 +1,3 @@
+project('a', 'c')
+
+executable('prog', '../../prog.c')
diff --git a/test cases/failing/60 subproj filegrab/test.json b/test cases/failing/60 subproj filegrab/test.json
new file mode 100644
index 0000000..04a6dbb
--- /dev/null
+++ b/test cases/failing/60 subproj filegrab/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/60 subproj filegrab/subprojects/a/meson.build:3:0: ERROR: Sandbox violation: Tried to grab file prog.c outside current (sub)project."
+ }
+ ]
+}
diff --git a/test cases/failing/61 grab subproj/meson.build b/test cases/failing/61 grab subproj/meson.build
new file mode 100644
index 0000000..30fc690
--- /dev/null
+++ b/test cases/failing/61 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/test cases/failing/61 grab subproj/subprojects/foo/meson.build b/test cases/failing/61 grab subproj/subprojects/foo/meson.build
new file mode 100644
index 0000000..b346f6d
--- /dev/null
+++ b/test cases/failing/61 grab subproj/subprojects/foo/meson.build
@@ -0,0 +1,3 @@
+project('foo', 'c')
+
+message('I do nothing.')
diff --git a/test cases/failing/61 grab subproj/subprojects/foo/sub.c b/test cases/failing/61 grab subproj/subprojects/foo/sub.c
new file mode 100644
index 0000000..a94b1f5
--- /dev/null
+++ b/test cases/failing/61 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/test cases/failing/61 grab subproj/test.json b/test cases/failing/61 grab subproj/test.json
new file mode 100644
index 0000000..873ec6c
--- /dev/null
+++ b/test cases/failing/61 grab subproj/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/61 grab subproj/meson.build:7:0: ERROR: Sandbox violation: Tried to grab file sub.c from a nested subproject."
+ }
+ ]
+}
diff --git a/test cases/failing/62 grab sibling/meson.build b/test cases/failing/62 grab sibling/meson.build
new file mode 100644
index 0000000..5ddc295
--- /dev/null
+++ b/test cases/failing/62 grab sibling/meson.build
@@ -0,0 +1,3 @@
+project('master')
+
+subproject('a')
diff --git a/test cases/failing/62 grab sibling/subprojects/a/meson.build b/test cases/failing/62 grab sibling/subprojects/a/meson.build
new file mode 100644
index 0000000..6dd9f61
--- /dev/null
+++ b/test cases/failing/62 grab sibling/subprojects/a/meson.build
@@ -0,0 +1,3 @@
+project('a', 'c')
+
+executable('sneaky', '../b/sneaky.c')
diff --git a/test cases/failing/62 grab sibling/subprojects/b/meson.build b/test cases/failing/62 grab sibling/subprojects/b/meson.build
new file mode 100644
index 0000000..57f261a
--- /dev/null
+++ b/test cases/failing/62 grab sibling/subprojects/b/meson.build
@@ -0,0 +1,3 @@
+projecT('b')
+
+message('I do nothing.')
diff --git a/test cases/failing/62 grab sibling/subprojects/b/sneaky.c b/test cases/failing/62 grab sibling/subprojects/b/sneaky.c
new file mode 100644
index 0000000..46718c6
--- /dev/null
+++ b/test cases/failing/62 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/test cases/failing/62 grab sibling/test.json b/test cases/failing/62 grab sibling/test.json
new file mode 100644
index 0000000..9e7c4bb
--- /dev/null
+++ b/test cases/failing/62 grab sibling/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/62 grab sibling/subprojects/a/meson.build:3:0: ERROR: Sandbox violation: Tried to grab file sneaky.c outside current (sub)project."
+ }
+ ]
+}
diff --git a/test cases/failing/63 string as link target/meson.build b/test cases/failing/63 string as link target/meson.build
new file mode 100644
index 0000000..cb83fff
--- /dev/null
+++ b/test cases/failing/63 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/test cases/failing/63 string as link target/prog.c b/test cases/failing/63 string as link target/prog.c
new file mode 100644
index 0000000..0314ff1
--- /dev/null
+++ b/test cases/failing/63 string as link target/prog.c
@@ -0,0 +1 @@
+int main(int argc, char **argv) { return 0; }
diff --git a/test cases/failing/63 string as link target/test.json b/test cases/failing/63 string as link target/test.json
new file mode 100644
index 0000000..a531d64
--- /dev/null
+++ b/test cases/failing/63 string as link target/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/63 string as link target/meson.build:2:0: ERROR: '' is not a target."
+ }
+ ]
+}
diff --git a/test cases/failing/64 dependency not-found and required/meson.build b/test cases/failing/64 dependency not-found and required/meson.build
new file mode 100644
index 0000000..1ce5747
--- /dev/null
+++ b/test cases/failing/64 dependency not-found and required/meson.build
@@ -0,0 +1,2 @@
+project('dep-test')
+dep = dependency('', required:true)
diff --git a/test cases/failing/64 dependency not-found and required/test.json b/test cases/failing/64 dependency not-found and required/test.json
new file mode 100644
index 0000000..84d14b4
--- /dev/null
+++ b/test cases/failing/64 dependency not-found and required/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/64 dependency not-found and required/meson.build:2:0: ERROR: Dependency is required but has no candidates."
+ }
+ ]
+}
diff --git a/test cases/failing/65 subproj different versions/main.c b/test cases/failing/65 subproj different versions/main.c
new file mode 100644
index 0000000..8793c62
--- /dev/null
+++ b/test cases/failing/65 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/test cases/failing/65 subproj different versions/meson.build b/test cases/failing/65 subproj different versions/meson.build
new file mode 100644
index 0000000..e964e42
--- /dev/null
+++ b/test cases/failing/65 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/test cases/failing/65 subproj different versions/subprojects/a/a.c b/test cases/failing/65 subproj different versions/subprojects/a/a.c
new file mode 100644
index 0000000..cd41a65
--- /dev/null
+++ b/test cases/failing/65 subproj different versions/subprojects/a/a.c
@@ -0,0 +1,5 @@
+#include "c.h"
+
+int a_fun() {
+ return c_fun();
+}
diff --git a/test cases/failing/65 subproj different versions/subprojects/a/a.h b/test cases/failing/65 subproj different versions/subprojects/a/a.h
new file mode 100644
index 0000000..8f1d49e
--- /dev/null
+++ b/test cases/failing/65 subproj different versions/subprojects/a/a.h
@@ -0,0 +1 @@
+int a_fun();
diff --git a/test cases/failing/65 subproj different versions/subprojects/a/meson.build b/test cases/failing/65 subproj different versions/subprojects/a/meson.build
new file mode 100644
index 0000000..e84182a
--- /dev/null
+++ b/test cases/failing/65 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/test cases/failing/65 subproj different versions/subprojects/b/b.c b/test cases/failing/65 subproj different versions/subprojects/b/b.c
new file mode 100644
index 0000000..f85f8c3
--- /dev/null
+++ b/test cases/failing/65 subproj different versions/subprojects/b/b.c
@@ -0,0 +1,5 @@
+#include "c.h"
+
+int b_fun(){
+return c_fun();
+}
diff --git a/test cases/failing/65 subproj different versions/subprojects/b/b.h b/test cases/failing/65 subproj different versions/subprojects/b/b.h
new file mode 100644
index 0000000..eced786
--- /dev/null
+++ b/test cases/failing/65 subproj different versions/subprojects/b/b.h
@@ -0,0 +1 @@
+int b_fun();
diff --git a/test cases/failing/65 subproj different versions/subprojects/b/meson.build b/test cases/failing/65 subproj different versions/subprojects/b/meson.build
new file mode 100644
index 0000000..0398340
--- /dev/null
+++ b/test cases/failing/65 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/test cases/failing/65 subproj different versions/subprojects/c/c.h b/test cases/failing/65 subproj different versions/subprojects/c/c.h
new file mode 100644
index 0000000..2b15f60
--- /dev/null
+++ b/test cases/failing/65 subproj different versions/subprojects/c/c.h
@@ -0,0 +1,3 @@
+static int c_fun(){
+ return 3;
+}
diff --git a/test cases/failing/65 subproj different versions/subprojects/c/meson.build b/test cases/failing/65 subproj different versions/subprojects/c/meson.build
new file mode 100644
index 0000000..7184933
--- /dev/null
+++ b/test cases/failing/65 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/test cases/failing/65 subproj different versions/test.json b/test cases/failing/65 subproj different versions/test.json
new file mode 100644
index 0000000..2f9f70d
--- /dev/null
+++ b/test cases/failing/65 subproj different versions/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/65 subproj different versions/subprojects/b/meson.build:3:0: ERROR: Dependency 'c' is required but not found."
+ }
+ ]
+}
diff --git a/test cases/failing/66 wrong boost module/meson.build b/test cases/failing/66 wrong boost module/meson.build
new file mode 100644
index 0000000..937e587
--- /dev/null
+++ b/test cases/failing/66 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/test cases/failing/66 wrong boost module/test.json b/test cases/failing/66 wrong boost module/test.json
new file mode 100644
index 0000000..c65a78c
--- /dev/null
+++ b/test cases/failing/66 wrong boost module/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/66 wrong boost module/meson.build:9:0: ERROR: Dependency \"boost\" not found, tried system"
+ }
+ ]
+}
diff --git a/test cases/failing/67 install_data rename bad size/file1.txt b/test cases/failing/67 install_data rename bad size/file1.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test cases/failing/67 install_data rename bad size/file1.txt
diff --git a/test cases/failing/67 install_data rename bad size/file2.txt b/test cases/failing/67 install_data rename bad size/file2.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test cases/failing/67 install_data rename bad size/file2.txt
diff --git a/test cases/failing/67 install_data rename bad size/meson.build b/test cases/failing/67 install_data rename bad size/meson.build
new file mode 100644
index 0000000..849bb9a
--- /dev/null
+++ b/test cases/failing/67 install_data rename bad size/meson.build
@@ -0,0 +1,3 @@
+project('data install test')
+
+install_data(['file1.txt', 'file2.txt'], rename : 'just one name')
diff --git a/test cases/failing/67 install_data rename bad size/test.json b/test cases/failing/67 install_data rename bad size/test.json
new file mode 100644
index 0000000..af1f0d9
--- /dev/null
+++ b/test cases/failing/67 install_data rename bad size/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/67 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/test cases/failing/68 skip only subdir/meson.build b/test cases/failing/68 skip only subdir/meson.build
new file mode 100644
index 0000000..4832bd4
--- /dev/null
+++ b/test cases/failing/68 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/test cases/failing/68 skip only subdir/subdir/meson.build b/test cases/failing/68 skip only subdir/subdir/meson.build
new file mode 100644
index 0000000..1ba447b
--- /dev/null
+++ b/test cases/failing/68 skip only subdir/subdir/meson.build
@@ -0,0 +1,3 @@
+subdir_done()
+
+error('Unreachable')
diff --git a/test cases/failing/68 skip only subdir/test.json b/test cases/failing/68 skip only subdir/test.json
new file mode 100644
index 0000000..4558847
--- /dev/null
+++ b/test cases/failing/68 skip only subdir/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/68 skip only subdir/meson.build:8:0: ERROR: File main.cpp does not exist."
+ }
+ ]
+}
diff --git a/test cases/failing/69 dual override/meson.build b/test cases/failing/69 dual override/meson.build
new file mode 100644
index 0000000..999b8bc
--- /dev/null
+++ b/test cases/failing/69 dual override/meson.build
@@ -0,0 +1,5 @@
+project('yo dawg')
+
+p = find_program('overrides.py')
+meson.override_find_program('override', p)
+meson.override_find_program('override', p)
diff --git a/test cases/failing/69 dual override/overrides.py b/test cases/failing/69 dual override/overrides.py
new file mode 100644
index 0000000..49e9b7a
--- /dev/null
+++ b/test cases/failing/69 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/test cases/failing/69 dual override/test.json b/test cases/failing/69 dual override/test.json
new file mode 100644
index 0000000..784d6b2
--- /dev/null
+++ b/test cases/failing/69 dual override/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/69 dual override/meson.build:5:6: ERROR: Tried to override executable \"override\" which has already been overridden."
+ }
+ ]
+}
diff --git a/test cases/failing/7 go to subproject/meson.build b/test cases/failing/7 go to subproject/meson.build
new file mode 100644
index 0000000..0354ce0
--- /dev/null
+++ b/test cases/failing/7 go to subproject/meson.build
@@ -0,0 +1,3 @@
+project('fff')
+
+subdir('subprojects')
diff --git a/test cases/failing/7 go to subproject/subprojects/meson.build b/test cases/failing/7 go to subproject/subprojects/meson.build
new file mode 100644
index 0000000..120344f
--- /dev/null
+++ b/test cases/failing/7 go to subproject/subprojects/meson.build
@@ -0,0 +1 @@
+x = 'x'
diff --git a/test cases/failing/7 go to subproject/test.json b/test cases/failing/7 go to subproject/test.json
new file mode 100644
index 0000000..c254757
--- /dev/null
+++ b/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/test cases/failing/70 override used/meson.build b/test cases/failing/70 override used/meson.build
new file mode 100644
index 0000000..128108e
--- /dev/null
+++ b/test cases/failing/70 override used/meson.build
@@ -0,0 +1,5 @@
+project('overridde an already found exe')
+
+old = find_program('something.py')
+replacement = find_program('other.py')
+meson.override_find_program('something.py', replacement)
diff --git a/test cases/failing/70 override used/other.py b/test cases/failing/70 override used/other.py
new file mode 100755
index 0000000..f62ba96
--- /dev/null
+++ b/test cases/failing/70 override used/other.py
@@ -0,0 +1,3 @@
+#!/usr/bin/env python3
+
+print('Doing something else.')
diff --git a/test cases/failing/70 override used/something.py b/test cases/failing/70 override used/something.py
new file mode 100755
index 0000000..64c9454
--- /dev/null
+++ b/test cases/failing/70 override used/something.py
@@ -0,0 +1,3 @@
+#!/usr/bin/env python3
+
+print('Doing something.')
diff --git a/test cases/failing/70 override used/test.json b/test cases/failing/70 override used/test.json
new file mode 100644
index 0000000..adb60aa
--- /dev/null
+++ b/test cases/failing/70 override used/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/70 override used/meson.build:5:6: ERROR: Tried to override finding of executable \"something.py\" which has already been found."
+ }
+ ]
+}
diff --git a/test cases/failing/71 run_command unclean exit/meson.build b/test cases/failing/71 run_command unclean exit/meson.build
new file mode 100644
index 0000000..f6bf895
--- /dev/null
+++ b/test cases/failing/71 run_command unclean exit/meson.build
@@ -0,0 +1,4 @@
+project('run_command unclean exit')
+
+rcprog = find_program('./returncode.py')
+run_command(rcprog, '1', check : true)
diff --git a/test cases/failing/71 run_command unclean exit/returncode.py b/test cases/failing/71 run_command unclean exit/returncode.py
new file mode 100755
index 0000000..84dbc5d
--- /dev/null
+++ b/test cases/failing/71 run_command unclean exit/returncode.py
@@ -0,0 +1,4 @@
+#!/usr/bin/env python3
+
+import sys
+exit(int(sys.argv[1]))
diff --git a/test cases/failing/71 run_command unclean exit/test.json b/test cases/failing/71 run_command unclean exit/test.json
new file mode 100644
index 0000000..ca5fcba
--- /dev/null
+++ b/test cases/failing/71 run_command unclean exit/test.json
@@ -0,0 +1,8 @@
+{
+ "stdout": [
+ {
+ "match": "re",
+ "line": "test cases/failing/71 run_command unclean exit/meson\\.build:4:0: ERROR: Command `.*['\"].*[\\\\/]test cases[\\\\/]failing[\\\\/]71 run_command unclean exit[\\\\/]\\.[\\\\/]returncode\\.py['\"] 1` failed with status 1\\."
+ }
+ ]
+}
diff --git a/test cases/failing/72 int literal leading zero/meson.build b/test cases/failing/72 int literal leading zero/meson.build
new file mode 100644
index 0000000..87c776f
--- /dev/null
+++ b/test cases/failing/72 int literal leading zero/meson.build
@@ -0,0 +1,5 @@
+
+# This should fail.
+# Decimal syntax is 123.
+# Octal syntax is 0o123.
+fail_0123 = 0123
diff --git a/test cases/failing/72 int literal leading zero/test.json b/test cases/failing/72 int literal leading zero/test.json
new file mode 100644
index 0000000..556e492
--- /dev/null
+++ b/test cases/failing/72 int literal leading zero/test.json
@@ -0,0 +1,8 @@
+{
+ "stdout": [
+ {
+ "comment": "this error message is not very informative",
+ "line": "test cases/failing/72 int literal leading zero/meson.build:5:13: ERROR: Expecting eof got number."
+ }
+ ]
+}
diff --git a/test cases/failing/73 configuration immutable/input b/test cases/failing/73 configuration immutable/input
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test cases/failing/73 configuration immutable/input
diff --git a/test cases/failing/73 configuration immutable/meson.build b/test cases/failing/73 configuration immutable/meson.build
new file mode 100644
index 0000000..b6cac41
--- /dev/null
+++ b/test cases/failing/73 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/test cases/failing/73 configuration immutable/test.json b/test cases/failing/73 configuration immutable/test.json
new file mode 100644
index 0000000..32d9427
--- /dev/null
+++ b/test cases/failing/73 configuration immutable/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/73 configuration immutable/meson.build:12:16: ERROR: Can not set values on configuration object that has been used."
+ }
+ ]
+}
diff --git a/test cases/failing/74 link with shared module on osx/meson.build b/test cases/failing/74 link with shared module on osx/meson.build
new file mode 100644
index 0000000..bf18b36
--- /dev/null
+++ b/test cases/failing/74 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/test cases/failing/74 link with shared module on osx/module.c b/test cases/failing/74 link with shared module on osx/module.c
new file mode 100644
index 0000000..81b0d5a
--- /dev/null
+++ b/test cases/failing/74 link with shared module on osx/module.c
@@ -0,0 +1,3 @@
+int func(void) {
+ return 1496;
+}
diff --git a/test cases/failing/74 link with shared module on osx/prog.c b/test cases/failing/74 link with shared module on osx/prog.c
new file mode 100644
index 0000000..8164d8d
--- /dev/null
+++ b/test cases/failing/74 link with shared module on osx/prog.c
@@ -0,0 +1,4 @@
+
+int main(int argc, char **argv) {
+ return func();
+}
diff --git a/test cases/failing/74 link with shared module on osx/test.json b/test cases/failing/74 link with shared module on osx/test.json
new file mode 100644
index 0000000..9ca1b9d
--- /dev/null
+++ b/test cases/failing/74 link with shared module on osx/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/74 link with shared module on osx/meson.build:8:0: ERROR: target prog links against shared module mymodule. This is not permitted on OSX"
+ }
+ ]
+}
diff --git a/test cases/failing/75 non ascii in ascii encoded configure file/config9.h.in b/test cases/failing/75 non ascii in ascii encoded configure file/config9.h.in
new file mode 100644
index 0000000..323bec6
--- /dev/null
+++ b/test cases/failing/75 non ascii in ascii encoded configure file/config9.h.in
@@ -0,0 +1 @@
+#define MESSAGE "@var@"
diff --git a/test cases/failing/75 non ascii in ascii encoded configure file/meson.build b/test cases/failing/75 non ascii in ascii encoded configure file/meson.build
new file mode 100644
index 0000000..26da80e
--- /dev/null
+++ b/test cases/failing/75 non ascii in ascii encoded configure file/meson.build
@@ -0,0 +1,10 @@
+project('non acsii to ascii encoding')
+# 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/test cases/failing/75 non ascii in ascii encoded configure file/test.json b/test cases/failing/75 non ascii in ascii encoded configure file/test.json
new file mode 100644
index 0000000..27cb0ab
--- /dev/null
+++ b/test cases/failing/75 non ascii in ascii encoded configure file/test.json
@@ -0,0 +1,8 @@
+{
+ "stdout": [
+ {
+ "match": "re",
+ "line": "test cases/failing/75 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/test cases/failing/76 subproj dependency not-found and required/meson.build b/test cases/failing/76 subproj dependency not-found and required/meson.build
new file mode 100644
index 0000000..c5a2961
--- /dev/null
+++ b/test cases/failing/76 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/test cases/failing/76 subproj dependency not-found and required/test.json b/test cases/failing/76 subproj dependency not-found and required/test.json
new file mode 100644
index 0000000..3b98436
--- /dev/null
+++ b/test cases/failing/76 subproj dependency not-found and required/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/76 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/test cases/failing/77 unfound run/meson.build b/test cases/failing/77 unfound run/meson.build
new file mode 100644
index 0000000..3f37e9a
--- /dev/null
+++ b/test cases/failing/77 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/test cases/failing/77 unfound run/test.json b/test cases/failing/77 unfound run/test.json
new file mode 100644
index 0000000..99464bd
--- /dev/null
+++ b/test cases/failing/77 unfound run/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/77 unfound run/meson.build:4:0: ERROR: Tried to use non-existing executable 'nonexisting_prog'"
+ }
+ ]
+}
diff --git a/test cases/failing/78 framework dependency with version/meson.build b/test cases/failing/78 framework dependency with version/meson.build
new file mode 100644
index 0000000..b7e04ba
--- /dev/null
+++ b/test cases/failing/78 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/test cases/failing/78 framework dependency with version/test.json b/test cases/failing/78 framework dependency with version/test.json
new file mode 100644
index 0000000..d43a498
--- /dev/null
+++ b/test cases/failing/78 framework dependency with version/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/78 framework dependency with version/meson.build:8:0: ERROR: Dependency lookup for appleframeworks with method 'framework' failed: Unknown version, but need ['>0']."
+ }
+ ]
+}
diff --git a/test cases/failing/79 override exe config/foo.c b/test cases/failing/79 override exe config/foo.c
new file mode 100644
index 0000000..03b2213
--- /dev/null
+++ b/test cases/failing/79 override exe config/foo.c
@@ -0,0 +1,3 @@
+int main(void) {
+ return 0;
+}
diff --git a/test cases/failing/79 override exe config/meson.build b/test cases/failing/79 override exe config/meson.build
new file mode 100644
index 0000000..a5d0924
--- /dev/null
+++ b/test cases/failing/79 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, check: true)
diff --git a/test cases/failing/79 override exe config/test.json b/test cases/failing/79 override exe config/test.json
new file mode 100644
index 0000000..1a671a3
--- /dev/null
+++ b/test cases/failing/79 override exe config/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/79 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/test cases/failing/8 recursive/meson.build b/test cases/failing/8 recursive/meson.build
new file mode 100644
index 0000000..0cf9c47
--- /dev/null
+++ b/test cases/failing/8 recursive/meson.build
@@ -0,0 +1,3 @@
+project('recursive')
+
+a = subproject('a')
diff --git a/test cases/failing/8 recursive/subprojects/a/meson.build b/test cases/failing/8 recursive/subprojects/a/meson.build
new file mode 100644
index 0000000..c368b5c
--- /dev/null
+++ b/test cases/failing/8 recursive/subprojects/a/meson.build
@@ -0,0 +1,3 @@
+project('a')
+
+b = subproject('b')
diff --git a/test cases/failing/8 recursive/subprojects/b/meson.build b/test cases/failing/8 recursive/subprojects/b/meson.build
new file mode 100644
index 0000000..93b46c0
--- /dev/null
+++ b/test cases/failing/8 recursive/subprojects/b/meson.build
@@ -0,0 +1,3 @@
+project('b')
+
+a = subproject('a')
diff --git a/test cases/failing/8 recursive/test.json b/test cases/failing/8 recursive/test.json
new file mode 100644
index 0000000..b4c964c
--- /dev/null
+++ b/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/test cases/failing/80 gl dependency with version/meson.build b/test cases/failing/80 gl dependency with version/meson.build
new file mode 100644
index 0000000..0127093
--- /dev/null
+++ b/test cases/failing/80 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/test cases/failing/80 gl dependency with version/test.json b/test cases/failing/80 gl dependency with version/test.json
new file mode 100644
index 0000000..3d39bc3
--- /dev/null
+++ b/test cases/failing/80 gl dependency with version/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/80 gl dependency with version/meson.build:9:0: ERROR: Dependency lookup for gl with method 'system' failed: Unknown version, but need ['>0']."
+ }
+ ]
+}
diff --git a/test cases/failing/81 threads dependency with version/meson.build b/test cases/failing/81 threads dependency with version/meson.build
new file mode 100644
index 0000000..6023fae
--- /dev/null
+++ b/test cases/failing/81 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/test cases/failing/81 threads dependency with version/test.json b/test cases/failing/81 threads dependency with version/test.json
new file mode 100644
index 0000000..308ac66
--- /dev/null
+++ b/test cases/failing/81 threads dependency with version/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/81 threads dependency with version/meson.build:3:0: ERROR: Dependency lookup for threads with method 'system' failed: Unknown version, but need ['>0']."
+ }
+ ]
+}
diff --git a/test cases/failing/82 gtest dependency with version/meson.build b/test cases/failing/82 gtest dependency with version/meson.build
new file mode 100644
index 0000000..efbffe1
--- /dev/null
+++ b/test cases/failing/82 gtest dependency with version/meson.build
@@ -0,0 +1,8 @@
+project('gtest dependency with version', '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/test cases/failing/82 gtest dependency with version/test.json b/test cases/failing/82 gtest dependency with version/test.json
new file mode 100644
index 0000000..7cf397b
--- /dev/null
+++ b/test cases/failing/82 gtest dependency with version/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/82 gtest dependency with version/meson.build:8:0: ERROR: Dependency 'gtest' is required but not found."
+ }
+ ]
+}
diff --git a/test cases/failing/83 dub libray/meson.build b/test cases/failing/83 dub libray/meson.build
new file mode 100644
index 0000000..306d5b3
--- /dev/null
+++ b/test cases/failing/83 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/test cases/failing/83 dub libray/test.json b/test cases/failing/83 dub libray/test.json
new file mode 100644
index 0000000..4dcbbed
--- /dev/null
+++ b/test cases/failing/83 dub libray/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/83 dub libray/meson.build:11:0: ERROR: Dependency \"dubtestproject\" not found"
+ }
+ ]
+}
diff --git a/test cases/failing/84 dub executable/meson.build b/test cases/failing/84 dub executable/meson.build
new file mode 100644
index 0000000..9a134ea
--- /dev/null
+++ b/test cases/failing/84 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/test cases/failing/84 dub executable/test.json b/test cases/failing/84 dub executable/test.json
new file mode 100644
index 0000000..6dfff62
--- /dev/null
+++ b/test cases/failing/84 dub executable/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/84 dub executable/meson.build:11:0: ERROR: Dependency \"dubtestproject:test1\" not found"
+ }
+ ]
+}
diff --git a/test cases/failing/85 dub compiler/meson.build b/test cases/failing/85 dub compiler/meson.build
new file mode 100644
index 0000000..36f1849
--- /dev/null
+++ b/test cases/failing/85 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/test cases/failing/85 dub compiler/test.json b/test cases/failing/85 dub compiler/test.json
new file mode 100644
index 0000000..50ee39b
--- /dev/null
+++ b/test cases/failing/85 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/85 dub compiler/meson.build:17:0: ERROR: Dependency \"dubtestproject:test2\" not found"
+ }
+ ]
+}
diff --git a/test cases/failing/86 subproj not-found dep/meson.build b/test cases/failing/86 subproj not-found dep/meson.build
new file mode 100644
index 0000000..2b17df1
--- /dev/null
+++ b/test cases/failing/86 subproj not-found dep/meson.build
@@ -0,0 +1,2 @@
+project('dep-test')
+missing = dependency('', fallback: ['somesubproj', 'notfound_dep'], required: true)
diff --git a/test cases/failing/86 subproj not-found dep/subprojects/somesubproj/meson.build b/test cases/failing/86 subproj not-found dep/subprojects/somesubproj/meson.build
new file mode 100644
index 0000000..5f451f4
--- /dev/null
+++ b/test cases/failing/86 subproj not-found dep/subprojects/somesubproj/meson.build
@@ -0,0 +1,3 @@
+project('dep', 'c')
+
+notfound_dep = dependency('', required : false)
diff --git a/test cases/failing/86 subproj not-found dep/test.json b/test cases/failing/86 subproj not-found dep/test.json
new file mode 100644
index 0000000..b662643
--- /dev/null
+++ b/test cases/failing/86 subproj not-found dep/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/86 subproj not-found dep/meson.build:2:0: ERROR: Dependency '(anonymous)' is required but not found."
+ }
+ ]
+}
diff --git a/test cases/failing/87 invalid configure file/input b/test cases/failing/87 invalid configure file/input
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test cases/failing/87 invalid configure file/input
diff --git a/test cases/failing/87 invalid configure file/meson.build b/test cases/failing/87 invalid configure file/meson.build
new file mode 100644
index 0000000..08eca2b
--- /dev/null
+++ b/test cases/failing/87 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/test cases/failing/87 invalid configure file/test.json b/test cases/failing/87 invalid configure file/test.json
new file mode 100644
index 0000000..d8ea73d
--- /dev/null
+++ b/test cases/failing/87 invalid configure file/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/87 invalid configure file/meson.build:3:0: ERROR: \"install_dir\" must be specified when \"install\" in a configure_file is true"
+ }
+ ]
+}
diff --git a/test cases/failing/88 kwarg dupe/meson.build b/test cases/failing/88 kwarg dupe/meson.build
new file mode 100644
index 0000000..06821a2
--- /dev/null
+++ b/test cases/failing/88 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/test cases/failing/88 kwarg dupe/prog.c b/test cases/failing/88 kwarg dupe/prog.c
new file mode 100644
index 0000000..5f3fbe6
--- /dev/null
+++ b/test cases/failing/88 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/test cases/failing/88 kwarg dupe/test.json b/test cases/failing/88 kwarg dupe/test.json
new file mode 100644
index 0000000..cfd68eb
--- /dev/null
+++ b/test cases/failing/88 kwarg dupe/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/88 kwarg dupe/meson.build:5:0: ERROR: Entry \"install\" defined both as a keyword argument and in a \"kwarg\" entry."
+ }
+ ]
+}
diff --git a/test cases/failing/89 missing pch file/meson.build b/test cases/failing/89 missing pch file/meson.build
new file mode 100644
index 0000000..a67b798
--- /dev/null
+++ b/test cases/failing/89 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/test cases/failing/89 missing pch file/prog.c b/test cases/failing/89 missing pch file/prog.c
new file mode 100644
index 0000000..11b7fad
--- /dev/null
+++ b/test cases/failing/89 missing pch file/prog.c
@@ -0,0 +1,3 @@
+int main(int argc, char **argv) {
+ return 0;
+}
diff --git a/test cases/failing/89 missing pch file/test.json b/test cases/failing/89 missing pch file/test.json
new file mode 100644
index 0000000..638d2e7
--- /dev/null
+++ b/test cases/failing/89 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/89 missing pch file/meson.build:2:0: ERROR: File pch/prog.h does not exist."
+ }
+ ]
+}
diff --git a/test cases/failing/9 missing extra file/meson.build b/test cases/failing/9 missing extra file/meson.build
new file mode 100644
index 0000000..725bec8
--- /dev/null
+++ b/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/test cases/failing/9 missing extra file/prog.c b/test cases/failing/9 missing extra file/prog.c
new file mode 100644
index 0000000..11b7fad
--- /dev/null
+++ b/test cases/failing/9 missing extra file/prog.c
@@ -0,0 +1,3 @@
+int main(int argc, char **argv) {
+ return 0;
+}
diff --git a/test cases/failing/9 missing extra file/test.json b/test cases/failing/9 missing extra file/test.json
new file mode 100644
index 0000000..188b6a6
--- /dev/null
+++ b/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/test cases/failing/90 pch source different folder/include/pch.h b/test cases/failing/90 pch source different folder/include/pch.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test cases/failing/90 pch source different folder/include/pch.h
diff --git a/test cases/failing/90 pch source different folder/meson.build b/test cases/failing/90 pch source different folder/meson.build
new file mode 100644
index 0000000..d320717
--- /dev/null
+++ b/test cases/failing/90 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/test cases/failing/90 pch source different folder/prog.c b/test cases/failing/90 pch source different folder/prog.c
new file mode 100644
index 0000000..3fb1295
--- /dev/null
+++ b/test cases/failing/90 pch source different folder/prog.c
@@ -0,0 +1 @@
+int main(void) {} \ No newline at end of file
diff --git a/test cases/failing/90 pch source different folder/src/pch.c b/test cases/failing/90 pch source different folder/src/pch.c
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test cases/failing/90 pch source different folder/src/pch.c
diff --git a/test cases/failing/90 pch source different folder/test.json b/test cases/failing/90 pch source different folder/test.json
new file mode 100644
index 0000000..cbbac3d
--- /dev/null
+++ b/test cases/failing/90 pch source different folder/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/90 pch source different folder/meson.build:4:0: ERROR: PCH files must be stored in the same folder."
+ }
+ ]
+}
diff --git a/test cases/failing/91 unknown config tool/meson.build b/test cases/failing/91 unknown config tool/meson.build
new file mode 100644
index 0000000..536976e
--- /dev/null
+++ b/test cases/failing/91 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/test cases/failing/91 unknown config tool/test.json b/test cases/failing/91 unknown config tool/test.json
new file mode 100644
index 0000000..e225167
--- /dev/null
+++ b/test cases/failing/91 unknown config tool/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/91 unknown config tool/meson.build:2:0: ERROR: Dependency \"no-such-config-tool\" not found"
+ }
+ ]
+}
diff --git a/test cases/failing/92 custom target install data/Info.plist.cpp b/test cases/failing/92 custom target install data/Info.plist.cpp
new file mode 100644
index 0000000..9ca2fcb
--- /dev/null
+++ b/test cases/failing/92 custom target install data/Info.plist.cpp
@@ -0,0 +1 @@
+Some data which gets processed before installation
diff --git a/test cases/failing/92 custom target install data/meson.build b/test cases/failing/92 custom target install data/meson.build
new file mode 100644
index 0000000..00d348c
--- /dev/null
+++ b/test cases/failing/92 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/test cases/failing/92 custom target install data/preproc.py b/test cases/failing/92 custom target install data/preproc.py
new file mode 100644
index 0000000..e6eba4c
--- /dev/null
+++ b/test cases/failing/92 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/test cases/failing/92 custom target install data/test.json b/test cases/failing/92 custom target install data/test.json
new file mode 100644
index 0000000..46ab013
--- /dev/null
+++ b/test cases/failing/92 custom target install data/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/92 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/test cases/failing/93 add dict non string key/meson.build b/test cases/failing/93 add dict non string key/meson.build
new file mode 100644
index 0000000..c81a3f7
--- /dev/null
+++ b/test cases/failing/93 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/test cases/failing/93 add dict non string key/test.json b/test cases/failing/93 add dict non string key/test.json
new file mode 100644
index 0000000..3ef2dde
--- /dev/null
+++ b/test cases/failing/93 add dict non string key/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/93 add dict non string key/meson.build:9:0: ERROR: Key must be a string"
+ }
+ ]
+}
diff --git a/test cases/failing/94 add dict duplicate keys/meson.build b/test cases/failing/94 add dict duplicate keys/meson.build
new file mode 100644
index 0000000..7a9b523
--- /dev/null
+++ b/test cases/failing/94 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/test cases/failing/94 add dict duplicate keys/test.json b/test cases/failing/94 add dict duplicate keys/test.json
new file mode 100644
index 0000000..5b2d7d6
--- /dev/null
+++ b/test cases/failing/94 add dict duplicate keys/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/94 add dict duplicate keys/meson.build:9:0: ERROR: Duplicate dictionary key: myKey"
+ }
+ ]
+}
diff --git a/test cases/failing/95 no host get_external_property/meson.build b/test cases/failing/95 no host get_external_property/meson.build
new file mode 100644
index 0000000..c956754
--- /dev/null
+++ b/test cases/failing/95 no host get_external_property/meson.build
@@ -0,0 +1,3 @@
+project('missing property')
+
+message(meson.get_external_property('nonexisting'))
diff --git a/test cases/failing/95 no host get_external_property/test.json b/test cases/failing/95 no host get_external_property/test.json
new file mode 100644
index 0000000..0ef6dd2
--- /dev/null
+++ b/test cases/failing/95 no host get_external_property/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/95 no host get_external_property/meson.build:3:0: ERROR: Unknown property for host machine: nonexisting"
+ }
+ ]
+}
diff --git a/test cases/failing/96 no native compiler/main.c b/test cases/failing/96 no native compiler/main.c
new file mode 100644
index 0000000..9b6bdc2
--- /dev/null
+++ b/test cases/failing/96 no native compiler/main.c
@@ -0,0 +1,3 @@
+int main(void) {
+ return 0;
+}
diff --git a/test cases/failing/96 no native compiler/meson.build b/test cases/failing/96 no native compiler/meson.build
new file mode 100644
index 0000000..f0126ac
--- /dev/null
+++ b/test cases/failing/96 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/test cases/failing/96 no native compiler/test.json b/test cases/failing/96 no native compiler/test.json
new file mode 100644
index 0000000..0107727
--- /dev/null
+++ b/test cases/failing/96 no native compiler/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/96 no native compiler/meson.build:12:0: ERROR: No host machine compiler for \"main.c\""
+ }
+ ]
+}
diff --git a/test cases/failing/97 subdir parse error/meson.build b/test cases/failing/97 subdir parse error/meson.build
new file mode 100644
index 0000000..a744396
--- /dev/null
+++ b/test cases/failing/97 subdir parse error/meson.build
@@ -0,0 +1,2 @@
+project('subdir false plusassign')
+subdir('subdir')
diff --git a/test cases/failing/97 subdir parse error/subdir/meson.build b/test cases/failing/97 subdir parse error/subdir/meson.build
new file mode 100644
index 0000000..3ac5ef9
--- /dev/null
+++ b/test cases/failing/97 subdir parse error/subdir/meson.build
@@ -0,0 +1 @@
+3 += 4
diff --git a/test cases/failing/97 subdir parse error/test.json b/test cases/failing/97 subdir parse error/test.json
new file mode 100644
index 0000000..414789e
--- /dev/null
+++ b/test cases/failing/97 subdir parse error/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/97 subdir parse error/subdir/meson.build:1:0: ERROR: Plusassignment target must be an id."
+ }
+ ]
+}
diff --git a/test cases/failing/98 invalid option file/meson.build b/test cases/failing/98 invalid option file/meson.build
new file mode 100644
index 0000000..b0347c3
--- /dev/null
+++ b/test cases/failing/98 invalid option file/meson.build
@@ -0,0 +1 @@
+project('invalid option file')
diff --git a/test cases/failing/98 invalid option file/meson_options.txt b/test cases/failing/98 invalid option file/meson_options.txt
new file mode 100644
index 0000000..eef843b
--- /dev/null
+++ b/test cases/failing/98 invalid option file/meson_options.txt
@@ -0,0 +1 @@
+'
diff --git a/test cases/failing/98 invalid option file/test.json b/test cases/failing/98 invalid option file/test.json
new file mode 100644
index 0000000..6ab5393
--- /dev/null
+++ b/test cases/failing/98 invalid option file/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/98 invalid option file/meson_options.txt:1:0: ERROR: lexer"
+ }
+ ]
+}
diff --git a/test cases/failing/99 no lang/main.c b/test cases/failing/99 no lang/main.c
new file mode 100644
index 0000000..9b6bdc2
--- /dev/null
+++ b/test cases/failing/99 no lang/main.c
@@ -0,0 +1,3 @@
+int main(void) {
+ return 0;
+}
diff --git a/test cases/failing/99 no lang/meson.build b/test cases/failing/99 no lang/meson.build
new file mode 100644
index 0000000..85c5db8
--- /dev/null
+++ b/test cases/failing/99 no lang/meson.build
@@ -0,0 +1,2 @@
+project('target without lang')
+executable('main', 'main.c')
diff --git a/test cases/failing/99 no lang/test.json b/test cases/failing/99 no lang/test.json
new file mode 100644
index 0000000..48c6dd7
--- /dev/null
+++ b/test cases/failing/99 no lang/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/99 no lang/meson.build:2:0: ERROR: No host machine compiler for 'main.c'"
+ }
+ ]
+}