From 7b4c799650629b080032caa374daccf325d33cc2 Mon Sep 17 00:00:00 2001 From: Tobias Stoeckmann Date: Sat, 4 Oct 2025 11:25:18 +0200 Subject: options: Fix long/short option mixture detection Take the key/value separator `=` into account when comparing long and short option names to avoid invalid matches. --- unittests/platformagnostictests.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'unittests') diff --git a/unittests/platformagnostictests.py b/unittests/platformagnostictests.py index 6a1ea38be..37ac7ad7a 100644 --- a/unittests/platformagnostictests.py +++ b/unittests/platformagnostictests.py @@ -560,3 +560,8 @@ class PlatformAgnosticTests(BasePlatformTests): self.clean() self._run(self.mtest_command + ['runner-with-exedep']) + + def test_setup_mixed_long_short_options(self) -> None: + """Mixing unity and unity_size as long and short options should work.""" + testdir = self.copy_srcdir(os.path.join(self.common_test_dir, '1 trivial')) + self.init(testdir, extra_args=['-Dunity=on', '--unity-size=123']) -- cgit v1.2.3