summaryrefslogtreecommitdiff
path: root/test cases/common
diff options
context:
space:
mode:
authorEyal Itkin <eyal.itkin@gmail.com>2025-10-13 16:51:02 +0300
committerXavier Claessens <xclaesse@gmail.com>2025-10-14 10:58:14 -0400
commit6f4bcf1d0f2eb99336c9e75b7bf34e7e5010a43d (patch)
tree0809f802cb09a1fcd43d536996dfd8074d442e02 /test cases/common
parent71a204f878f76e684f8740c2e91789d5699e6c43 (diff)
downloadmeson-6f4bcf1d0f2eb99336c9e75b7bf34e7e5010a43d.tar.gz
pkgconfig: Improve handling of empty string deps
Fix the original bug fix for #13950 to only warn about empty required strings, instead of failing the entire build. This will simplify the workflow for users that build the string from a possibly empty list, and save them the need for the added if-check. Signed-off-by: Eyal Itkin <eyal.itkin@gmail.com>
Diffstat (limited to 'test cases/common')
-rw-r--r--test cases/common/44 pkgconfig-gen/meson.build8
-rw-r--r--test cases/common/44 pkgconfig-gen/test.json1
2 files changed, 9 insertions, 0 deletions
diff --git a/test cases/common/44 pkgconfig-gen/meson.build b/test cases/common/44 pkgconfig-gen/meson.build
index fd6371ef4..c31287348 100644
--- a/test cases/common/44 pkgconfig-gen/meson.build
+++ b/test cases/common/44 pkgconfig-gen/meson.build
@@ -193,3 +193,11 @@ simple7 = library('simple7', include_directories: 'inc1')
dep = declare_dependency(include_directories: 'inc2')
install_headers('inc1/inc1.h', 'inc2/inc2.h')
pkgg.generate(simple7, libraries: dep)
+
+# Regression test: empty string passed to requires.private should not
+# fail the build
+pkgg.generate(
+ name : 'emptytest',
+ description : 'Check that requires.private can be an empty string',
+ requires_private: '',
+)
diff --git a/test cases/common/44 pkgconfig-gen/test.json b/test cases/common/44 pkgconfig-gen/test.json
index 01786d424..36c7e95e1 100644
--- a/test cases/common/44 pkgconfig-gen/test.json
+++ b/test cases/common/44 pkgconfig-gen/test.json
@@ -16,6 +16,7 @@
{"type": "file", "file": "usr/lib/pkgconfig/simple5.pc"},
{"type": "file", "file": "usr/lib/pkgconfig/simple6.pc"},
{"type": "file", "file": "usr/lib/pkgconfig/simple7.pc"},
+ {"type": "file", "file": "usr/lib/pkgconfig/emptytest.pc"},
{"type": "file", "file": "usr/lib/pkgconfig/ct.pc"},
{"type": "file", "file": "usr/lib/pkgconfig/ct0.pc"},
{"type": "file", "file": "usr/share/pkgconfig/libhello_nolib.pc"}