Skip to content

Commit

Permalink
[Test Only] Port the Idna test fixes to support Unicode 15 (#110705)
Browse files Browse the repository at this point in the history
  • Loading branch information
tarekgh authored Dec 14, 2024
1 parent 3316399 commit d801ec5
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))
if (PlatformDetection.ICUVersion >= new Version(74, 0))
fileName = "IdnaTest_15_1.txt";
else if (PlatformDetection.ICUVersion >= new Version(66, 0))
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))
if (PlatformDetection.ICUVersion >= new Version(74, 0))
return new Unicode_15_1_IdnaTest(line, lineCount);
else if (PlatformDetection.ICUVersion >= new Version(66, 0))
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 d801ec5

Please sign in to comment.