aboutsummaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2022-01-31 14:45:12 -0500
committerJussi Pakkanen <jpakkane@gmail.com>2022-02-01 00:47:33 +0200
commit0185f2ed61290715f990f786597f3b73a36e678f (patch)
tree63bc5cf91c55d04fcd09974d29b16f92abaa9cb0 /test cases
parent577842912266b61f7cdfa569d9ea99d0b0fa3b01 (diff)
downloadmeson-0185f2ed61290715f990f786597f3b73a36e678f.zip
meson-0185f2ed61290715f990f786597f3b73a36e678f.tar.gz
meson-0185f2ed61290715f990f786597f3b73a36e678f.tar.bz2
Fix dep.get_variable() with empty string default_value
Diffstat (limited to 'test cases')
-rw-r--r--test cases/common/211 dependency get_variable method/meson.build1
-rw-r--r--test cases/common/211 dependency get_variable method/test.json9
2 files changed, 10 insertions, 0 deletions
diff --git a/test cases/common/211 dependency get_variable method/meson.build b/test cases/common/211 dependency get_variable method/meson.build
index 384b3f3..b7e7035 100644
--- a/test cases/common/211 dependency get_variable method/meson.build
+++ b/test cases/common/211 dependency get_variable method/meson.build
@@ -19,6 +19,7 @@ else
'pkg-config didn\'t get default when we should have.')
assert(dep.get_variable(pkgconfig : 'prefix', default_value : default) != default,
'pkg-config got default when we shouldn\'t have.')
+ assert(dep.get_variable(pkgconfig : 'pkgvarnotfound', default_value : '') == '')
endif
dep_ct = dependency('llvm', method : 'config-tool', required : false)
diff --git a/test cases/common/211 dependency get_variable method/test.json b/test cases/common/211 dependency get_variable method/test.json
new file mode 100644
index 0000000..5281618
--- /dev/null
+++ b/test cases/common/211 dependency get_variable method/test.json
@@ -0,0 +1,9 @@
+{
+ "stdout": [
+ {
+ "line": ".*pkgvarnotfound.*",
+ "match": "re",
+ "count": 0
+ }
+ ]
+ }