Skip to content

Commit d801ec5

Browse files
authored
[Test Only] Port the Idna test fixes to support Unicode 15 (#110705)
1 parent 3316399 commit d801ec5

File tree

6 files changed

+6454
-3
lines changed

6 files changed

+6454
-3
lines changed

src/libraries/System.Globalization.Extensions/tests/IdnMapping/Data/Factory.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ private static string RemoveComment(string line)
2626
private static Stream GetIdnaTestTxt()
2727
{
2828
string fileName = null;
29-
if (PlatformDetection.ICUVersion >= new Version(66, 0))
29+
if (PlatformDetection.ICUVersion >= new Version(74, 0))
30+
fileName = "IdnaTest_15_1.txt";
31+
else if (PlatformDetection.ICUVersion >= new Version(66, 0))
3032
fileName = "IdnaTest_13.txt";
3133
else if (PlatformDetection.IsWindows7)
3234
fileName = "IdnaTest_Win7.txt";
@@ -61,7 +63,9 @@ private static IEnumerable<IConformanceIdnaTest> ParseFile(Stream stream, Func<s
6163

6264
private static IConformanceIdnaTest GetConformanceIdnaTest(string line, int lineCount)
6365
{
64-
if (PlatformDetection.ICUVersion >= new Version(66, 0))
66+
if (PlatformDetection.ICUVersion >= new Version(74, 0))
67+
return new Unicode_15_1_IdnaTest(line, lineCount);
68+
else if (PlatformDetection.ICUVersion >= new Version(66, 0))
6569
return new Unicode_13_0_IdnaTest(line, lineCount);
6670
else if (PlatformDetection.IsWindows7)
6771
return new Unicode_Win7_IdnaTest(line, lineCount);

0 commit comments

Comments
 (0)