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/common | |
parent | 2e80c521295f45105229e5c7bffa3ebfd60b3445 (diff) | |
download | meson-bcf369ea3c6ac9d48759a9a11304a853dfdab5ff.zip meson-bcf369ea3c6ac9d48759a9a11304a853dfdab5ff.tar.gz meson-bcf369ea3c6ac9d48759a9a11304a853dfdab5ff.tar.bz2 |
Fix consistency in variables kwarg
Share common code to extract the `variables` kwarg in
declare_dependency() and pkg.generate().
Diffstat (limited to 'test cases/common')
-rw-r--r-- | test cases/common/218 dependency get_variable method/meson.build | 3 | ||||
-rw-r--r-- | test cases/common/47 pkgconfig-gen/meson.build | 3 |
2 files changed, 5 insertions, 1 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 8c189bb..9f60836 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 8c16cd5..4638123 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: |