aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authortextshell <textshell@users.noreply.github.com>2018-04-14 20:57:12 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2018-04-14 21:57:12 +0300
commit0535f38af99825731ef3dbd49937bc03bd097337 (patch)
tree76f8fddfd6d6252296243076b85a93e752bd5d1f /run_unittests.py
parentc2f062a02e0c803041be08f922c2d4ad234ca301 (diff)
downloadmeson-0535f38af99825731ef3dbd49937bc03bd097337.zip
meson-0535f38af99825731ef3dbd49937bc03bd097337.tar.gz
meson-0535f38af99825731ef3dbd49937bc03bd097337.tar.bz2
pkgconfig module: Fix regression that Requires.private is generated as 'Q, t, 5, C, o, r, e' instead of Qt5Core. (#3406)
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py
index a65f15d..1e8a778 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -42,6 +42,7 @@ from mesonbuild.mesonlib import (
from mesonbuild.environment import Environment, detect_ninja
from mesonbuild.mesonlib import MesonException, EnvironmentException
from mesonbuild.dependencies import PkgConfigDependency, ExternalProgram
+import mesonbuild.modules.pkgconfig
from run_tests import exe_suffix, get_fake_options
from run_tests import get_builddir_target_args, get_backend_commands, Backend
@@ -454,6 +455,19 @@ class InternalTests(unittest.TestCase):
if f.name != 'add_release_note_snippets_here':
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
+
+ mock = Mock()
+ mock.pcdep = Mock()
+ mock.pcdep.name = "some_name"
+ mock.version_reqs = []
+ deps.add_pub_libs([mock])
+ self.assertEqual(deps.format_reqs(deps.pub_reqs), "some_name")
+
class BasePlatformTests(unittest.TestCase):
def setUp(self):