From 7b6e527f440cd7e6f8be2b07cee320ee6ca18786 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 29 Apr 2024 06:41:38 +0200 Subject: Adding upstream version 1.0.1. Signed-off-by: Daniel Baumann --- test cases/warning/1 version for string div/a/b.c | 3 +++ test cases/warning/1 version for string div/meson.build | 3 +++ test cases/warning/1 version for string div/test.json | 8 ++++++++ test cases/warning/2 languages missing native/meson.build | 3 +++ test cases/warning/2 languages missing native/test.json | 7 +++++++ test cases/warning/3 fallback consistency/meson.build | 7 +++++++ .../warning/3 fallback consistency/subprojects/sub/meson.build | 5 +++++ test cases/warning/3 fallback consistency/test.json | 10 ++++++++++ test cases/warning/4 fallback consistency/meson.build | 4 ++++ .../warning/4 fallback consistency/subprojects/sub/meson.build | 5 +++++ test cases/warning/4 fallback consistency/test.json | 10 ++++++++++ test cases/warning/5 fallback consistency/meson.build | 4 ++++ test cases/warning/5 fallback consistency/subprojects/foo.wrap | 6 ++++++ .../warning/5 fallback consistency/subprojects/foo/meson.build | 6 ++++++ test cases/warning/5 fallback consistency/test.json | 10 ++++++++++ test cases/warning/6 list add/meson.build | 7 +++++++ test cases/warning/6 list add/test.json | 7 +++++++ test cases/warning/7 module without unstable/meson.build | 3 +++ test cases/warning/7 module without unstable/test.json | 7 +++++++ test cases/warning/8 target with no sources/meson.build | 3 +++ test cases/warning/8 target with no sources/test.json | 7 +++++++ 21 files changed, 125 insertions(+) create mode 100644 test cases/warning/1 version for string div/a/b.c create mode 100644 test cases/warning/1 version for string div/meson.build create mode 100644 test cases/warning/1 version for string div/test.json create mode 100644 test cases/warning/2 languages missing native/meson.build create mode 100644 test cases/warning/2 languages missing native/test.json create mode 100644 test cases/warning/3 fallback consistency/meson.build create mode 100644 test cases/warning/3 fallback consistency/subprojects/sub/meson.build create mode 100644 test cases/warning/3 fallback consistency/test.json create mode 100644 test cases/warning/4 fallback consistency/meson.build create mode 100644 test cases/warning/4 fallback consistency/subprojects/sub/meson.build create mode 100644 test cases/warning/4 fallback consistency/test.json create mode 100644 test cases/warning/5 fallback consistency/meson.build create mode 100644 test cases/warning/5 fallback consistency/subprojects/foo.wrap create mode 100644 test cases/warning/5 fallback consistency/subprojects/foo/meson.build create mode 100644 test cases/warning/5 fallback consistency/test.json create mode 100644 test cases/warning/6 list add/meson.build create mode 100644 test cases/warning/6 list add/test.json create mode 100644 test cases/warning/7 module without unstable/meson.build create mode 100644 test cases/warning/7 module without unstable/test.json create mode 100644 test cases/warning/8 target with no sources/meson.build create mode 100644 test cases/warning/8 target with no sources/test.json (limited to 'test cases/warning') diff --git a/test cases/warning/1 version for string div/a/b.c b/test cases/warning/1 version for string div/a/b.c new file mode 100644 index 0000000..74de8a8 --- /dev/null +++ b/test cases/warning/1 version for string div/a/b.c @@ -0,0 +1,3 @@ +int main(void) +{ +} diff --git a/test cases/warning/1 version for string div/meson.build b/test cases/warning/1 version for string div/meson.build new file mode 100644 index 0000000..54e9708 --- /dev/null +++ b/test cases/warning/1 version for string div/meson.build @@ -0,0 +1,3 @@ +project('warn on string division', 'c', meson_version: '>=0.48.0') + +executable('prog', 'a' / 'b.c') diff --git a/test cases/warning/1 version for string div/test.json b/test cases/warning/1 version for string div/test.json new file mode 100644 index 0000000..e8acb69 --- /dev/null +++ b/test cases/warning/1 version for string div/test.json @@ -0,0 +1,8 @@ +{ + "stdout": [ + { + "comment": "literal '/' appears in output, irrespective of os.path.sep, as that's the operator", + "line": "test cases/warning/1 version for string div/meson.build:3: WARNING: Project targets '>=0.48.0' but uses feature introduced in '0.49.0': / with string arguments." + } + ] +} diff --git a/test cases/warning/2 languages missing native/meson.build b/test cases/warning/2 languages missing native/meson.build new file mode 100644 index 0000000..e204715 --- /dev/null +++ b/test cases/warning/2 languages missing native/meson.build @@ -0,0 +1,3 @@ +project('languages missing native', + meson_version : '>= 0.54') +add_languages('c') diff --git a/test cases/warning/2 languages missing native/test.json b/test cases/warning/2 languages missing native/test.json new file mode 100644 index 0000000..f929654 --- /dev/null +++ b/test cases/warning/2 languages missing native/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/warning/2 languages missing native/meson.build:3: WARNING: add_languages is missing native:, assuming languages are wanted for both host and build." + } + ] +} diff --git a/test cases/warning/3 fallback consistency/meson.build b/test cases/warning/3 fallback consistency/meson.build new file mode 100644 index 0000000..ad2b226 --- /dev/null +++ b/test cases/warning/3 fallback consistency/meson.build @@ -0,0 +1,7 @@ +project('proj', 'c') + +# The first call succeed and cache the value of 'sub' dependency. The 2nd call +# should return the cached value, but still verify the fallback variable is +# consistent. +dependency('sub', fallback : ['sub', 'dep1']) +dependency('sub', fallback : ['sub', 'dep2']) diff --git a/test cases/warning/3 fallback consistency/subprojects/sub/meson.build b/test cases/warning/3 fallback consistency/subprojects/sub/meson.build new file mode 100644 index 0000000..12a6570 --- /dev/null +++ b/test cases/warning/3 fallback consistency/subprojects/sub/meson.build @@ -0,0 +1,5 @@ +project('proj', 'c') + +dep1 = declare_dependency() +dep2 = declare_dependency() +meson.override_dependency('sub', dep1) diff --git a/test cases/warning/3 fallback consistency/test.json b/test cases/warning/3 fallback consistency/test.json new file mode 100644 index 0000000..60e25b4 --- /dev/null +++ b/test cases/warning/3 fallback consistency/test.json @@ -0,0 +1,10 @@ +{ + "stdout": [ + { + "line": "WARNING: Inconsistency: Subproject has overridden the dependency with another variable than 'dep2'" + } + ], + "tools": { + "cmake": ">=3.14" + } +} diff --git a/test cases/warning/4 fallback consistency/meson.build b/test cases/warning/4 fallback consistency/meson.build new file mode 100644 index 0000000..013b473 --- /dev/null +++ b/test cases/warning/4 fallback consistency/meson.build @@ -0,0 +1,4 @@ +project('proj', 'c') + +# Subproject overrides 'sub' with another variable than dep2. This should warn. +dependency('sub', fallback : ['sub', 'dep2']) diff --git a/test cases/warning/4 fallback consistency/subprojects/sub/meson.build b/test cases/warning/4 fallback consistency/subprojects/sub/meson.build new file mode 100644 index 0000000..12a6570 --- /dev/null +++ b/test cases/warning/4 fallback consistency/subprojects/sub/meson.build @@ -0,0 +1,5 @@ +project('proj', 'c') + +dep1 = declare_dependency() +dep2 = declare_dependency() +meson.override_dependency('sub', dep1) diff --git a/test cases/warning/4 fallback consistency/test.json b/test cases/warning/4 fallback consistency/test.json new file mode 100644 index 0000000..60e25b4 --- /dev/null +++ b/test cases/warning/4 fallback consistency/test.json @@ -0,0 +1,10 @@ +{ + "stdout": [ + { + "line": "WARNING: Inconsistency: Subproject has overridden the dependency with another variable than 'dep2'" + } + ], + "tools": { + "cmake": ">=3.14" + } +} diff --git a/test cases/warning/5 fallback consistency/meson.build b/test cases/warning/5 fallback consistency/meson.build new file mode 100644 index 0000000..3af6ce8 --- /dev/null +++ b/test cases/warning/5 fallback consistency/meson.build @@ -0,0 +1,4 @@ +project('fallback consistency') + +# Subproject overrides foo with foo_dep but wrap file says it's bar_dep. This should warn. +dependency('foo') diff --git a/test cases/warning/5 fallback consistency/subprojects/foo.wrap b/test cases/warning/5 fallback consistency/subprojects/foo.wrap new file mode 100644 index 0000000..28055d9 --- /dev/null +++ b/test cases/warning/5 fallback consistency/subprojects/foo.wrap @@ -0,0 +1,6 @@ +[wrap-file] +source_url = http://host.invalid/foo.tar.gz +source_filename = foo.tar.gz + +[provide] +foo = bar_dep diff --git a/test cases/warning/5 fallback consistency/subprojects/foo/meson.build b/test cases/warning/5 fallback consistency/subprojects/foo/meson.build new file mode 100644 index 0000000..fb58a4a --- /dev/null +++ b/test cases/warning/5 fallback consistency/subprojects/foo/meson.build @@ -0,0 +1,6 @@ +project('sub') + +foo_dep = declare_dependency() +meson.override_dependency('foo', foo_dep) + +bar_dep = declare_dependency() diff --git a/test cases/warning/5 fallback consistency/test.json b/test cases/warning/5 fallback consistency/test.json new file mode 100644 index 0000000..8ab28d1 --- /dev/null +++ b/test cases/warning/5 fallback consistency/test.json @@ -0,0 +1,10 @@ +{ + "stdout": [ + { + "line": "WARNING: Inconsistency: Subproject has overridden the dependency with another variable than 'bar_dep'" + } + ], + "tools": { + "cmake": ">=3.14" + } +} diff --git a/test cases/warning/6 list add/meson.build b/test cases/warning/6 list add/meson.build new file mode 100644 index 0000000..94b7eab --- /dev/null +++ b/test cases/warning/6 list add/meson.build @@ -0,0 +1,7 @@ +project('test list add', meson_version: '>=0.59.0') + +l1 = [1, 2, 3] +l2 = l1 + 4 +l2 += 5 + +message(l2) diff --git a/test cases/warning/6 list add/test.json b/test cases/warning/6 list add/test.json new file mode 100644 index 0000000..e3ce8d0 --- /dev/null +++ b/test cases/warning/6 list add/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/warning/6 list add/meson.build:4: WARNING: Project targets '>=0.59.0' but uses feature introduced in '0.60.0': list.. The right hand operand was not a list." + } + ] +} diff --git a/test cases/warning/7 module without unstable/meson.build b/test cases/warning/7 module without unstable/meson.build new file mode 100644 index 0000000..409a236 --- /dev/null +++ b/test cases/warning/7 module without unstable/meson.build @@ -0,0 +1,3 @@ +project('module import without unstable', meson_version : '>= 0.55') + +import('keyval') diff --git a/test cases/warning/7 module without unstable/test.json b/test cases/warning/7 module without unstable/test.json new file mode 100644 index 0000000..62b8aa1 --- /dev/null +++ b/test cases/warning/7 module without unstable/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/warning/7 module without unstable/meson.build:3: WARNING: Project targets '>= 0.55' but uses feature introduced in '0.56.0': module keyval as stable module. Consider either adding \"unstable-\" to the module name, or updating the meson required version to \">= 0.56.0\"" + } + ] +} diff --git a/test cases/warning/8 target with no sources/meson.build b/test cases/warning/8 target with no sources/meson.build new file mode 100644 index 0000000..2a8ee11 --- /dev/null +++ b/test cases/warning/8 target with no sources/meson.build @@ -0,0 +1,3 @@ +project('no sources', 'c') + +static_library('no sources') diff --git a/test cases/warning/8 target with no sources/test.json b/test cases/warning/8 target with no sources/test.json new file mode 100644 index 0000000..30e5b05 --- /dev/null +++ b/test cases/warning/8 target with no sources/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "WARNING: Build target no sources has no sources. This was never supposed to be allowed but did because of a bug, support will be removed in a future release of Meson" + } + ] +} -- cgit v1.2.3