From a5a45e4f6877c40b2f9e2019f8212dd688fcb30a Mon Sep 17 00:00:00 2001 From: Daniel Mensinger Date: Wed, 19 Dec 2018 22:50:40 +0100 Subject: Added unit test --- run_unittests.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/run_unittests.py b/run_unittests.py index f1b2249..713546b 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -2995,6 +2995,23 @@ recommended as it is not supported on some platforms''') self.assertEqual(res['subprojects'][0]['version'], 'undefined') self.assertEqual(res['subprojects'][0]['descriptive_name'], 'subproject') + def test_introspect_projectinfo_subprojects(self): + testdir = os.path.join(self.common_test_dir, '103 subproject subdir') + self.init(testdir) + res = self.introspect('--projectinfo') + expected = { + 'descriptive_name': 'proj', + 'version': 'undefined', + 'subprojects': [ + { + 'descriptive_name': 'sub', + 'name': 'sub', + 'version': 'undefined' + } + ] + } + self.assertDictEqual(res, expected) + class FailureTests(BasePlatformTests): ''' -- cgit v1.1