@@ -1256,7 +1256,8 @@ def test_entitlements_options_var_subs(self):
12561256 },
12571257 }, {'Foo' : 'abc123.' })
12581258
1259- def test_entitlements_options_raw_subs (self ):
1259+ def test_entitlements_options_preserves_wildcards (self ):
1260+ """Verify that wildcards in entitlements are preserved (matching Xcode behavior)."""
12601261 plist1 = {'Bar' : 'abc123.*' }
12611262 self ._assert_plisttool_result ({
12621263 'plists' : [plist1 ],
@@ -1267,7 +1268,7 @@ def test_entitlements_options_raw_subs(self):
12671268 'Version' : 1 ,
12681269 },
12691270 },
1270- }, {'Bar' : 'abc123.my.bundle.id ' })
1271+ }, {'Bar' : 'abc123.* ' })
12711272
12721273 def test_entitlements_no_profile_for_app_id_prefix (self ):
12731274 with self .assertRaisesRegex (
@@ -1622,23 +1623,20 @@ def test_entitlements_keychain_not_allowed(self):
16221623 },
16231624 })
16241625
1625- def test_entitlements_keychain_entitlements_wildcard_not_allowed (self ):
1626- with self .assertRaisesRegex (
1627- plisttool .PlistToolError ,
1628- re .escape (plisttool .ENTITLEMENTS_VALUE_HAS_WILDCARD % (
1629- _testing_target , 'keychain-access-groups' , 'QWERTY.*' ))):
1630- _plisttool_result ({
1631- 'plists' : [{'keychain-access-groups' : ['QWERTY.*' ]}],
1632- 'entitlements_options' : {
1633- 'bundle_id' : 'my.bundle.id' ,
1634- 'profile_metadata_file' : {
1635- 'Entitlements' : {
1636- 'keychain-access-groups' : ['QWERTY.*' ],
1637- },
1638- 'Version' : 1 ,
1639- },
1640- },
1641- })
1626+ def test_entitlements_keychain_entitlements_wildcard_allowed (self ):
1627+ """Verify that wildcards in keychain-access-groups are allowed (matching Xcode behavior)."""
1628+ self ._assert_plisttool_result ({
1629+ 'plists' : [{'keychain-access-groups' : ['QWERTY.*' ]}],
1630+ 'entitlements_options' : {
1631+ 'bundle_id' : 'my.bundle.id' ,
1632+ 'profile_metadata_file' : {
1633+ 'Entitlements' : {
1634+ 'keychain-access-groups' : ['QWERTY.*' ],
1635+ },
1636+ 'Version' : 1 ,
1637+ },
1638+ },
1639+ }, {'keychain-access-groups' : ['QWERTY.*' ]})
16421640
16431641 def test_entitlements_keychain_mismatch (self ):
16441642 with self .assertRaisesRegex (
0 commit comments