Skip to content

Commit 2543eef

Browse files
committed
Add test for empty string default_value
Backported from 0185f2e, which contains a fix that doesn't need to be backported, but we can backport the test to ensure that it's still working in the 0.61 branch.
1 parent a82882b commit 2543eef

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

test cases/common/211 dependency get_variable method/meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ else
1919
'pkg-config didn\'t get default when we should have.')
2020
assert(dep.get_variable(pkgconfig : 'prefix', default_value : default) != default,
2121
'pkg-config got default when we shouldn\'t have.')
22+
assert(dep.get_variable(pkgconfig : 'pkgvarnotfound', default_value : '') == '')
2223
endif
2324

2425
dep_ct = dependency('llvm', method : 'config-tool', required : false)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"stdout": [
3+
{
4+
"line": ".*pkgvarnotfound.*",
5+
"match": "re",
6+
"count": 0
7+
}
8+
]
9+
}

0 commit comments

Comments
 (0)