From 247b1a598a0d9a1dc12a56a52202c2c64d27560b Mon Sep 17 00:00:00 2001 From: Martin Hostettler Date: Thu, 19 Apr 2018 21:47:31 +0200 Subject: regression: pkgconfig module: Fix Fix regression in Requires.private generation. The fix for Requires generation in #3406 missed a second code path with the same problem. Passing a pkgconfig dependency to requires would produce Q, t, 5, C, o,r, e' instead of 'Qt5Core'. This was introduced in 8efd940. --- run_unittests.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'run_unittests.py') diff --git a/run_unittests.py b/run_unittests.py index e0cd1ec..c507a0c 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -456,7 +456,6 @@ class InternalTests(unittest.TestCase): self.assertTrue(False, 'A file without .md suffix in snippets dir: ' + f.name) def test_pkgconfig_module(self): - deps = mesonbuild.modules.pkgconfig.DependenciesHelper("thislib") class Mock: pass @@ -465,9 +464,17 @@ class InternalTests(unittest.TestCase): mock.pcdep = Mock() mock.pcdep.name = "some_name" mock.version_reqs = [] + + # pkgconfig dependency as lib + deps = mesonbuild.modules.pkgconfig.DependenciesHelper("thislib") deps.add_pub_libs([mock]) self.assertEqual(deps.format_reqs(deps.pub_reqs), "some_name") + # pkgconfig dependency as requires + deps = mesonbuild.modules.pkgconfig.DependenciesHelper("thislib") + deps.add_pub_reqs([mock]) + self.assertEqual(deps.format_reqs(deps.pub_reqs), "some_name") + class BasePlatformTests(unittest.TestCase): def setUp(self): -- cgit v1.1