diff options
| -rw-r--r-- | mesonbuild/options.py | 5 | ||||
| -rw-r--r-- | unittests/allplatformstests.py | 5 |
2 files changed, 7 insertions, 3 deletions
diff --git a/mesonbuild/options.py b/mesonbuild/options.py index 7c22332ea..838ccb794 100644 --- a/mesonbuild/options.py +++ b/mesonbuild/options.py @@ -1305,7 +1305,7 @@ class OptionStore: # A) a system option in which case the subproject is None # B) a project option, in which case the subproject is '' (this method is only called from top level) # - # The key parsing fucntion can not handle the difference between the two + # The key parsing function can not handle the difference between the two # and defaults to A. assert isinstance(keystr, str) key = OptionKey.from_string(keystr) @@ -1350,8 +1350,7 @@ class OptionStore: # # Some base options (sanitizers etc) might get added later. # Permitting them all is not strictly correct. - assert isinstance(keystr, str) - if ':' not in keystr and not self.is_compiler_option(key) and not self.is_base_option(key): + if not self.is_compiler_option(key) and not self.is_base_option(key): raise MesonException(f'Unknown options: "{keystr}"') self.pending_project_options[key] = valstr else: diff --git a/unittests/allplatformstests.py b/unittests/allplatformstests.py index 865b5e34e..634a860ad 100644 --- a/unittests/allplatformstests.py +++ b/unittests/allplatformstests.py @@ -5143,3 +5143,8 @@ class AllPlatformTests(BasePlatformTests): testdir = os.path.join(self.unit_test_dir, '117 empty project') args = ['-Db_ndebug=if_release'] self.init(testdir, extra_args=args) + + def test_wipe_with_args(self): + testdir = os.path.join(self.common_test_dir, '1 trivial') + self.init(testdir, extra_args=['-Dc_args=-DSOMETHING']) + self.init(testdir, extra_args=['--wipe']) |
