diff options
| author | Xavier Claessens <xavier.claessens@collabora.com> | 2020-10-15 09:56:08 -0400 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2020-10-16 18:09:56 +0300 |
| commit | bcf369ea3c6ac9d48759a9a11304a853dfdab5ff (patch) | |
| tree | 3e5080da666144231c1c36ceaeb62fb3727df07a /test cases | |
| parent | 2e80c521295f45105229e5c7bffa3ebfd60b3445 (diff) | |
| download | meson-bcf369ea3c6ac9d48759a9a11304a853dfdab5ff.tar.gz | |
Fix consistency in variables kwarg
Share common code to extract the `variables` kwarg in
declare_dependency() and pkg.generate().
Diffstat (limited to 'test cases')
5 files changed, 8 insertions, 4 deletions
diff --git a/test cases/common/218 dependency get_variable method/meson.build b/test cases/common/218 dependency get_variable method/meson.build index 8c189bbe3..9f60836e2 100644 --- a/test cases/common/218 dependency get_variable method/meson.build +++ b/test cases/common/218 dependency get_variable method/meson.build @@ -59,3 +59,6 @@ idep = declare_dependency() assert(idep.get_variable(pkgconfig : 'foo', cmake : 'foo', configtool : 'foo', default_value : default) == default, 'something went wrong with an InternalDependency with no variables.') + +idep = declare_dependency(variables : ['foo=value']) +assert(idep.get_variable(internal: 'foo') == 'value') diff --git a/test cases/common/47 pkgconfig-gen/meson.build b/test cases/common/47 pkgconfig-gen/meson.build index 8c16cd5bc..4638123cf 100644 --- a/test cases/common/47 pkgconfig-gen/meson.build +++ b/test cases/common/47 pkgconfig-gen/meson.build @@ -64,7 +64,8 @@ pkgg.generate( name : 'libhello_nolib', description : 'A minimalistic pkgconfig file.', version : libver, - dataonly: true + dataonly: true, + variables : {'foo': 'bar'}, ) # Regression test for 2 cases: diff --git a/test cases/failing/47 pkgconfig variables zero length/test.json b/test cases/failing/47 pkgconfig variables zero length/test.json index 097fee12e..39ffde4c6 100644 --- a/test cases/failing/47 pkgconfig variables zero length/test.json +++ b/test cases/failing/47 pkgconfig variables zero length/test.json @@ -1,7 +1,7 @@ { "stdout": [ { - "line": "test cases/failing/47 pkgconfig variables zero length/meson.build:8:5: ERROR: Invalid variable \"=value\". Variables must be in 'name=value' format" + "line": "test cases/failing/47 pkgconfig variables zero length/meson.build:8:5: ERROR: Empty variable name or value" } ] } diff --git a/test cases/failing/48 pkgconfig variables zero length value/test.json b/test cases/failing/48 pkgconfig variables zero length value/test.json index 50a35ce97..8aa1bc58f 100644 --- a/test cases/failing/48 pkgconfig variables zero length value/test.json +++ b/test cases/failing/48 pkgconfig variables zero length value/test.json @@ -1,7 +1,7 @@ { "stdout": [ { - "line": "test cases/failing/48 pkgconfig variables zero length value/meson.build:8:5: ERROR: Invalid variable \"key=\". Variables must be in 'name=value' format" + "line": "test cases/failing/48 pkgconfig variables zero length value/meson.build:8:5: ERROR: Empty variable name or value" } ] } diff --git a/test cases/failing/49 pkgconfig variables not key value/test.json b/test cases/failing/49 pkgconfig variables not key value/test.json index cf07e6221..082bd7955 100644 --- a/test cases/failing/49 pkgconfig variables not key value/test.json +++ b/test cases/failing/49 pkgconfig variables not key value/test.json @@ -1,7 +1,7 @@ { "stdout": [ { - "line": "test cases/failing/49 pkgconfig variables not key value/meson.build:8:5: ERROR: Invalid variable \"this_should_be_key_value\". Variables must be in 'name=value' format" + "line": "test cases/failing/49 pkgconfig variables not key value/meson.build:8:5: ERROR: Variable 'this_should_be_key_value' must have a value separated by equals sign." } ] } |
