Skip to content

Commit

Permalink
Fix System.Globalization.Extensions.Tests for icu 74/unicode 15.1
Browse files Browse the repository at this point in the history
The test file IdnaTest_15_1.txt is a direct copy of
https://www.unicode.org/Public/idna/15.1.0/IdnaTestV2.txt without any
further changes.

Fixes: #100287
  • Loading branch information
omajid committed Jul 22, 2024
1 parent 4555974 commit f0e050d
Show file tree
Hide file tree
Showing 6 changed files with 6,454 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ private static string RemoveComment(string line)
private static Stream GetIdnaTestTxt()
{
string fileName = null;
if (PlatformDetection.ICUVersion >= new Version(66, 0) || PlatformDetection.IsHybridGlobalizationOnApplePlatform)
if (PlatformDetection.ICUVersion >= new Version(74, 0))
fileName = "IdnaTest_15_1.txt";
else if (PlatformDetection.ICUVersion >= new Version(66, 0) || PlatformDetection.IsHybridGlobalizationOnApplePlatform)
fileName = "IdnaTest_13.txt";
else if (PlatformDetection.IsWindows7)
fileName = "IdnaTest_Win7.txt";
Expand Down Expand Up @@ -61,7 +63,9 @@ private static IEnumerable<IConformanceIdnaTest> ParseFile(Stream stream, Func<s

private static IConformanceIdnaTest GetConformanceIdnaTest(string line, int lineCount)
{
if (PlatformDetection.ICUVersion >= new Version(66, 0) || PlatformDetection.IsHybridGlobalizationOnApplePlatform)
if (PlatformDetection.ICUVersion >= new Version(74, 0))
return new Unicode_15_1_IdnaTest(line, lineCount);
else if (PlatformDetection.ICUVersion >= new Version(66, 0) || PlatformDetection.IsHybridGlobalizationOnApplePlatform)
return new Unicode_13_0_IdnaTest(line, lineCount);
else if (PlatformDetection.IsWindows7)
return new Unicode_Win7_IdnaTest(line, lineCount);
Expand Down
Loading

0 comments on commit f0e050d

Please sign in to comment.