Skip to content

Commit

Permalink
Fix Idna Test (#72817)
Browse files Browse the repository at this point in the history
* Fix Idna Test

* Update src/libraries/System.Globalization.Extensions/tests/IdnMapping/Data/Unicode_9_0/Unicode_9_0_IdnaTest.cs

Co-authored-by: Stephen Toub <[email protected]>

Co-authored-by: Stephen Toub <[email protected]>
  • Loading branch information
tarekgh and stephentoub authored Jul 26, 2022
1 parent d9887e5 commit cc7ccfd
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,14 @@ public Unicode_9_0_IdnaTest(string line, int lineNumber)

Type = ConvertStringToType(split[0].Trim());
Source = EscapedToLiteralString(split[1], lineNumber);
bool validDomainName = (split.Length != 5 || split[4].Trim() != "NV8");
bool validDomainName = (split.Length != 5 || split[4].Trim() != "NV8");

// Server 2019 uses ICU 61.0 whose IDNA does not support the following cases. Ignore these entries there.
if (PlatformDetection.IsWindowsServer2019 && Source.EndsWith("\ud802\udf8b\u3002\udb40\udd0a", StringComparison.Ordinal))
{
Source = "";
}

UnicodeResult = new ConformanceIdnaUnicodeTestResult(EscapedToLiteralString(split[2], lineNumber), Source, validDomainName);
ASCIIResult = new ConformanceIdnaTestResult(EscapedToLiteralString(split[3], lineNumber), UnicodeResult.Value);
LineNumber = lineNumber;
Expand Down

0 comments on commit cc7ccfd

Please sign in to comment.