@@ -388,11 +388,28 @@ public static IEnumerable<object[]> Ctor_String_TestData()
388388 }
389389 }
390390
391+ public static IEnumerable < object [ ] > Ctor_Undetermined_TestData ( )
392+ {
393+ yield return new object [ ] { "und-us" , "und-US" , "und-US" } ;
394+ yield return new object [ ] { "und-us_tradnl" , "und-US" , "und-US_tradnl" } ;
395+
396+ // On AppleMobile, the behavior of CultureInfo differs due to platform-specific
397+ // handling of Unicode extensions and subtags. These platforms preserve the full language tag, including
398+ // extensions, while other platforms normalize the tag to a simpler form.
399+ if ( PlatformDetection . IsAppleMobile )
400+ {
401+ yield return new object [ ] { "und-es-u-co-phoneb" , "und-ES-u-co-phoneb" , "und-ES-u-co-phoneb" } ;
402+ yield return new object [ ] { "und-es-t-something" , "und-ES-t-something" , "und-ES-t-something" } ;
403+ }
404+ else
405+ {
406+ yield return new object [ ] { "und-es-u-co-phoneb" , "und-ES" , "und-ES_phoneb" } ;
407+ yield return new object [ ] { "und-es-t-something" , "und-ES" , "und-ES" } ;
408+ }
409+ }
410+
391411 [ ConditionalTheory ( typeof ( PlatformDetection ) , nameof ( PlatformDetection . IsIcuGlobalization ) ) ]
392- [ InlineData ( "und-us" , "und-US" , "und-US" ) ]
393- [ InlineData ( "und-us_tradnl" , "und-US" , "und-US_tradnl" ) ]
394- [ InlineData ( "und-es-u-co-phoneb" , "und-ES" , "und-ES_phoneb" ) ]
395- [ InlineData ( "und-es-t-something" , "und-ES" , "und-ES" ) ]
412+ [ MemberData ( nameof ( Ctor_Undetermined_TestData ) ) ]
396413 public void CtorUndeterminedLanguageTag ( string cultureName , string expectedCultureName , string expectedSortName )
397414 {
398415 CultureInfo culture = new CultureInfo ( cultureName ) ;
0 commit comments