diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2018-04-27 11:11:22 -0400 |
---|---|---|
committer | Xavier Claessens <xavier.claessens@collabora.com> | 2018-04-27 11:19:12 -0400 |
commit | 6de68e520141f73088f8b8aaeb39abc59661da6d (patch) | |
tree | 87517f8129e759d41ffb4871a9688f6ba03dae90 /run_unittests.py | |
parent | 5970f1be3c5299851f4e2c7e70e3f8c9975391ab (diff) | |
download | meson-6de68e520141f73088f8b8aaeb39abc59661da6d.zip meson-6de68e520141f73088f8b8aaeb39abc59661da6d.tar.gz meson-6de68e520141f73088f8b8aaeb39abc59661da6d.tar.bz2 |
Passing --default-library=both should override project value
Looks like this has always been broken, had_argument_for() was checking
if we have --default_library instead of --default-library.
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-x | run_unittests.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py index 204fbfe..de383a4 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -2077,6 +2077,7 @@ recommended as it can lead to undefined behaviour on some platforms''') # Verify default values when passing no args self.init(testdir) obj = mesonbuild.coredata.load(self.builddir) + self.assertEqual(obj.builtins['default_library'].value, 'static') self.assertEqual(obj.builtins['warning_level'].value, '1') self.wipe() @@ -2110,6 +2111,15 @@ recommended as it can lead to undefined behaviour on some platforms''') self.assertIn('passed as both', e.stderr) self.wipe() + # --default-library should override default value from project() + self.init(testdir, extra_args=['--default-library=both']) + obj = mesonbuild.coredata.load(self.builddir) + self.assertEqual(obj.builtins['default_library'].value, 'both') + self.setconf('--default-library=shared') + obj = mesonbuild.coredata.load(self.builddir) + self.assertEqual(obj.builtins['default_library'].value, 'shared') + self.wipe() + class FailureTests(BasePlatformTests): ''' |