diff --git a/generate.ts b/generate.ts index c7e2747a4cc16e7e79bc5a70be72d3b6259fd4ee..339facdbb531467792c2f1c8a2ed382295b1161e 100644 --- a/generate.ts +++ b/generate.ts @@ -242,7 +242,7 @@ fn toAsciiFail( if (toAsciiNStatus === "[]") w.write(`test { try toAsciiPass("${E(source)}", "${E(toAsciiN)}", false); }\n`); if (toAsciiTStatus === "[]") w.write(`test { try toAsciiPass("${E(source)}", "${E(toAsciiT)}", true); }\n`); - if (toUnicodeStatus !== "[]") w.write(`test { try toUnicodeFail("${E(source)}"); } // ${toUnicodeStatus}\n`); + if (toUnicodeStatus !== "[]" && toUnicodeStatus !== "[X4_2]") w.write(`test { try toUnicodeFail("${E(source)}"); } // ${toUnicodeStatus}\n`); if (toAsciiNStatus !== "[]") w.write(`test { try toAsciiFail("${E(source)}", false); } // ${toAsciiNStatus}\n`); if (toAsciiTStatus !== "[]") w.write(`test { try toAsciiFail("${E(source)}", true); } // ${toAsciiTStatus}\n`); } diff --git a/idna.zig b/idna.zig index 0aebf0a13b03b15e013938e3b56bc66ae86b025c..b44aa253b7c159a40705c5c4e77c83da3cdf00f9 100644 --- a/idna.zig +++ b/idna.zig @@ -41,6 +41,7 @@ pub fn ToASCII( if (VerifyDnsLength) { // 1. The length of the domain name, excluding the root label and its dot, is from 1 to 253. + if (map.list.items.len < 1) return error.IDNAFailure; if (map.list.items.len > 253) return error.IDNAFailure; // 2. The length of each label is from 1 to 63. for (map.lengths.items, 0..) |l, n| { @@ -176,10 +177,6 @@ fn Processing( try Validity_Criteria(label, CheckHyphens, Transitional_Processing, UseSTD3ASCIIRules, CheckJoiners, CheckBidi and domain_is_bidi); } } - - // X4_2 - if (std.mem.indexOf(u8, map.list.items, "..") != null) return error.IDNAFailure; - if (std.mem.startsWith(u8, map.list.items, ".")) return error.IDNAFailure; } // diff --git a/testv2.zig b/testv2.zig index e1113bac316ae4a82bcfe9d1ec2d8c5c5dd99da2..2fe81f694abf91675792c20eaefde3fe61ff3847 100755 --- a/testv2.zig +++ b/testv2.zig @@ -323,13 +323,10 @@ test { try toAsciiPass("\xe1\xa7\x9a", "xn--pkf", true); } test { try toUnicodePass("xn--pkf", "\xe1\xa7\x9a"); } test { try toAsciiPass("xn--pkf", "xn--pkf", false); } test { try toAsciiPass("xn--pkf", "xn--pkf", true); } -test { try toUnicodeFail("\"\""); } // [X4_2] test { try toAsciiFail("\"\"", false); } // [A4_1, A4_2] test { try toAsciiFail("\"\"", true); } // [A4_1, A4_2] -test { try toUnicodeFail("\xe3\x80\x82"); } // [X4_2] test { try toAsciiFail("\xe3\x80\x82", false); } // [A4_1, A4_2] test { try toAsciiFail("\xe3\x80\x82", true); } // [A4_1, A4_2] -test { try toUnicodeFail("."); } // [X4_2] test { try toAsciiFail(".", false); } // [A4_1, A4_2] test { try toAsciiFail(".", true); } // [A4_1, A4_2] test { try toUnicodePass("\xea\xad\xa0", "\xea\xad\xa0"); } @@ -941,7 +938,6 @@ test { try toAsciiFail("A.b..-Q--A\xcc\x88-.E", true); } // [V2, V3, A4_2] test { try toUnicodeFail("a.b..xn---q----jra.e"); } // [V2, V3, X4_2] test { try toAsciiFail("a.b..xn---q----jra.e", false); } // [V2, V3, A4_2] test { try toAsciiFail("a.b..xn---q----jra.e", true); } // [V2, V3, A4_2] -test { try toUnicodeFail("a..c"); } // [X4_2] test { try toAsciiFail("a..c", false); } // [A4_2] test { try toAsciiFail("a..c", true); } // [A4_2] test { try toUnicodeFail("a.-b."); } // [V3] @@ -959,19 +955,14 @@ test { try toAsciiFail("a.bc--de.f", true); } // [V2] test { try toUnicodeFail("xn--xn---epa"); } // [V2, V4] test { try toAsciiFail("xn--xn---epa", false); } // [V2, V4] test { try toAsciiFail("xn--xn---epa", true); } // [V2, V4] -test { try toUnicodeFail("\xc3\xa4.\xc2\xad.c"); } // [X4_2] test { try toAsciiFail("\xc3\xa4.\xc2\xad.c", false); } // [A4_2] test { try toAsciiFail("\xc3\xa4.\xc2\xad.c", true); } // [A4_2] -test { try toUnicodeFail("a\xcc\x88.\xc2\xad.c"); } // [X4_2] test { try toAsciiFail("a\xcc\x88.\xc2\xad.c", false); } // [A4_2] test { try toAsciiFail("a\xcc\x88.\xc2\xad.c", true); } // [A4_2] -test { try toUnicodeFail("A\xcc\x88.\xc2\xad.C"); } // [X4_2] test { try toAsciiFail("A\xcc\x88.\xc2\xad.C", false); } // [A4_2] test { try toAsciiFail("A\xcc\x88.\xc2\xad.C", true); } // [A4_2] -test { try toUnicodeFail("\xc3\x84.\xc2\xad.C"); } // [X4_2] test { try toAsciiFail("\xc3\x84.\xc2\xad.C", false); } // [A4_2] test { try toAsciiFail("\xc3\x84.\xc2\xad.C", true); } // [A4_2] -test { try toUnicodeFail("xn--4ca..c"); } // [X4_2] test { try toAsciiFail("xn--4ca..c", false); } // [A4_2] test { try toAsciiFail("xn--4ca..c", true); } // [A4_2] test { try toUnicodeFail("\xc3\xa4.-b."); } // [V3] @@ -1316,19 +1307,15 @@ test { try toAsciiPass("\xd9\x84", "xn--ghb", true); } test { try toUnicodeFail("xn--ghb413k"); } // [B3, C1] test { try toAsciiFail("xn--ghb413k", false); } // [B3, C1] test { try toAsciiFail("xn--ghb413k", true); } // [B3, C1] -test { try toUnicodeFail("a\xe3\x80\x82\xe3\x80\x82b"); } // [X4_2] test { try toAsciiFail("a\xe3\x80\x82\xe3\x80\x82b", false); } // [A4_2] test { try toAsciiFail("a\xe3\x80\x82\xe3\x80\x82b", true); } // [A4_2] -test { try toUnicodeFail("A\xe3\x80\x82\xe3\x80\x82B"); } // [X4_2] test { try toAsciiFail("A\xe3\x80\x82\xe3\x80\x82B", false); } // [A4_2] test { try toAsciiFail("A\xe3\x80\x82\xe3\x80\x82B", true); } // [A4_2] -test { try toUnicodeFail("a..b"); } // [X4_2] test { try toAsciiFail("a..b", false); } // [A4_2] test { try toAsciiFail("a..b", true); } // [A4_2] test { try toUnicodeFail("\xe2\x80\x8d\xe3\x80\x82\xe3\x80\x82\xda\xb9\xe2\x80\x8c"); } // [B1, B3, C1, C2, X4_2] test { try toAsciiFail("\xe2\x80\x8d\xe3\x80\x82\xe3\x80\x82\xda\xb9\xe2\x80\x8c", false); } // [B1, B3, C1, C2, A4_2] test { try toAsciiFail("\xe2\x80\x8d\xe3\x80\x82\xe3\x80\x82\xda\xb9\xe2\x80\x8c", true); } // [A4_2] -test { try toUnicodeFail("..xn--skb"); } // [X4_2] test { try toAsciiFail("..xn--skb", false); } // [A4_2] test { try toAsciiFail("..xn--skb", true); } // [A4_2] test { try toUnicodeFail("xn--1ug..xn--skb080k"); } // [B1, B3, C1, C2, X4_2] @@ -4559,7 +4546,6 @@ test { try toAsciiFail("\xe1\xa2\x87\xe2\x80\x8d\xea\xa3\x84\xe3\x80\x82\xe3\x80 test { try toUnicodeFail("\xe1\xa2\x87\xe2\x80\x8d\xea\xa3\x84\xe3\x80\x82\xe3\x80\x82\xf0\x9e\xa4\x98"); } // [B6, C2, X4_2] test { try toAsciiFail("\xe1\xa2\x87\xe2\x80\x8d\xea\xa3\x84\xe3\x80\x82\xe3\x80\x82\xf0\x9e\xa4\x98", false); } // [B6, C2, A4_2] test { try toAsciiFail("\xe1\xa2\x87\xe2\x80\x8d\xea\xa3\x84\xe3\x80\x82\xe3\x80\x82\xf0\x9e\xa4\x98", true); } // [A4_2] -test { try toUnicodeFail("xn--09e4694e..xn--ye6h"); } // [X4_2] test { try toAsciiFail("xn--09e4694e..xn--ye6h", false); } // [A4_2] test { try toAsciiFail("xn--09e4694e..xn--ye6h", true); } // [A4_2] test { try toUnicodeFail("xn--09e669a6x8j..xn--ye6h"); } // [B6, C2, X4_2] @@ -5543,7 +5529,6 @@ test { try toAsciiFail("\xe2\x80\x8c.\xe2\x89\xaf", true); } // [A4_2] test { try toUnicodeFail("\xe2\x80\x8c.>\xcc\xb8"); } // [C1] test { try toAsciiFail("\xe2\x80\x8c.>\xcc\xb8", false); } // [C1] test { try toAsciiFail("\xe2\x80\x8c.>\xcc\xb8", true); } // [A4_2] -test { try toUnicodeFail(".xn--hdh"); } // [X4_2] test { try toAsciiFail(".xn--hdh", false); } // [A4_2] test { try toAsciiFail(".xn--hdh", true); } // [A4_2] test { try toUnicodeFail("xn--0ug.xn--hdh"); } // [C1] @@ -5957,34 +5942,24 @@ test { try toAsciiFail("\xe2\x89\xaf\xe2\x92\x88\xe3\x80\x82\xc3\x9f", true); } test { try toUnicodeFail(">\xcc\xb8\xe2\x92\x88\xe3\x80\x82\xc3\x9f"); } // [V7] test { try toAsciiFail(">\xcc\xb8\xe2\x92\x88\xe3\x80\x82\xc3\x9f", false); } // [V7] test { try toAsciiFail(">\xcc\xb8\xe2\x92\x88\xe3\x80\x82\xc3\x9f", true); } // [V7] -test { try toUnicodeFail("\xe2\x89\xaf1.\xe3\x80\x82\xc3\x9f"); } // [X4_2] test { try toAsciiFail("\xe2\x89\xaf1.\xe3\x80\x82\xc3\x9f", false); } // [A4_2] test { try toAsciiFail("\xe2\x89\xaf1.\xe3\x80\x82\xc3\x9f", true); } // [A4_2] -test { try toUnicodeFail(">\xcc\xb81.\xe3\x80\x82\xc3\x9f"); } // [X4_2] test { try toAsciiFail(">\xcc\xb81.\xe3\x80\x82\xc3\x9f", false); } // [A4_2] test { try toAsciiFail(">\xcc\xb81.\xe3\x80\x82\xc3\x9f", true); } // [A4_2] -test { try toUnicodeFail(">\xcc\xb81.\xe3\x80\x82SS"); } // [X4_2] test { try toAsciiFail(">\xcc\xb81.\xe3\x80\x82SS", false); } // [A4_2] test { try toAsciiFail(">\xcc\xb81.\xe3\x80\x82SS", true); } // [A4_2] -test { try toUnicodeFail("\xe2\x89\xaf1.\xe3\x80\x82SS"); } // [X4_2] test { try toAsciiFail("\xe2\x89\xaf1.\xe3\x80\x82SS", false); } // [A4_2] test { try toAsciiFail("\xe2\x89\xaf1.\xe3\x80\x82SS", true); } // [A4_2] -test { try toUnicodeFail("\xe2\x89\xaf1.\xe3\x80\x82ss"); } // [X4_2] test { try toAsciiFail("\xe2\x89\xaf1.\xe3\x80\x82ss", false); } // [A4_2] test { try toAsciiFail("\xe2\x89\xaf1.\xe3\x80\x82ss", true); } // [A4_2] -test { try toUnicodeFail(">\xcc\xb81.\xe3\x80\x82ss"); } // [X4_2] test { try toAsciiFail(">\xcc\xb81.\xe3\x80\x82ss", false); } // [A4_2] test { try toAsciiFail(">\xcc\xb81.\xe3\x80\x82ss", true); } // [A4_2] -test { try toUnicodeFail(">\xcc\xb81.\xe3\x80\x82Ss"); } // [X4_2] test { try toAsciiFail(">\xcc\xb81.\xe3\x80\x82Ss", false); } // [A4_2] test { try toAsciiFail(">\xcc\xb81.\xe3\x80\x82Ss", true); } // [A4_2] -test { try toUnicodeFail("\xe2\x89\xaf1.\xe3\x80\x82Ss"); } // [X4_2] test { try toAsciiFail("\xe2\x89\xaf1.\xe3\x80\x82Ss", false); } // [A4_2] test { try toAsciiFail("\xe2\x89\xaf1.\xe3\x80\x82Ss", true); } // [A4_2] -test { try toUnicodeFail("xn--1-ogo..ss"); } // [X4_2] test { try toAsciiFail("xn--1-ogo..ss", false); } // [A4_2] test { try toAsciiFail("xn--1-ogo..ss", true); } // [A4_2] -test { try toUnicodeFail("xn--1-ogo..xn--zca"); } // [X4_2] test { try toAsciiFail("xn--1-ogo..xn--zca", false); } // [A4_2] test { try toAsciiFail("xn--1-ogo..xn--zca", true); } // [A4_2] test { try toUnicodeFail(">\xcc\xb8\xe2\x92\x88\xe3\x80\x82SS"); } // [V7] @@ -6047,7 +6022,6 @@ test { try toAsciiFail("\xe2\x80\x8c\xe3\x80\x82\xe2\x89\xa0", true); } // [A4_2 test { try toUnicodeFail("\xe2\x80\x8c\xe3\x80\x82=\xcc\xb8"); } // [C1] test { try toAsciiFail("\xe2\x80\x8c\xe3\x80\x82=\xcc\xb8", false); } // [C1] test { try toAsciiFail("\xe2\x80\x8c\xe3\x80\x82=\xcc\xb8", true); } // [A4_2] -test { try toUnicodeFail(".xn--1ch"); } // [X4_2] test { try toAsciiFail(".xn--1ch", false); } // [A4_2] test { try toAsciiFail(".xn--1ch", true); } // [A4_2] test { try toUnicodeFail("xn--0ug.xn--1ch"); } // [C1] @@ -6827,10 +6801,8 @@ test { try toAsciiFail("xn--y86c.xn----73a596nuh9t", true); } // [B1, B5, B6, V7 test { try toUnicodeFail("\xef\xb8\x85\xef\xb8\x92\xe3\x80\x82\xf0\xa6\x80\xbe\xe1\xb3\xa0"); } // [V7] test { try toAsciiFail("\xef\xb8\x85\xef\xb8\x92\xe3\x80\x82\xf0\xa6\x80\xbe\xe1\xb3\xa0", false); } // [V7] test { try toAsciiFail("\xef\xb8\x85\xef\xb8\x92\xe3\x80\x82\xf0\xa6\x80\xbe\xe1\xb3\xa0", true); } // [V7] -test { try toUnicodeFail("\xef\xb8\x85\xe3\x80\x82\xe3\x80\x82\xf0\xa6\x80\xbe\xe1\xb3\xa0"); } // [X4_2] test { try toAsciiFail("\xef\xb8\x85\xe3\x80\x82\xe3\x80\x82\xf0\xa6\x80\xbe\xe1\xb3\xa0", false); } // [A4_2] test { try toAsciiFail("\xef\xb8\x85\xe3\x80\x82\xe3\x80\x82\xf0\xa6\x80\xbe\xe1\xb3\xa0", true); } // [A4_2] -test { try toUnicodeFail("..xn--t6f5138v"); } // [X4_2] test { try toAsciiFail("..xn--t6f5138v", false); } // [A4_2] test { try toAsciiFail("..xn--t6f5138v", true); } // [A4_2] test { try toUnicodeFail("xn--y86c.xn--t6f5138v"); } // [V7] @@ -8642,10 +8614,8 @@ test { try toAsciiFail("xn--6fb.xn--gmb469jjf1h", true); } // [C1, V6] test { try toUnicodeFail("\xe1\xa1\x8c\xef\xbc\x8e\xef\xb8\x92\xe1\xa2\x91"); } // [V7] test { try toAsciiFail("\xe1\xa1\x8c\xef\xbc\x8e\xef\xb8\x92\xe1\xa2\x91", false); } // [V7] test { try toAsciiFail("\xe1\xa1\x8c\xef\xbc\x8e\xef\xb8\x92\xe1\xa2\x91", true); } // [V7] -test { try toUnicodeFail("\xe1\xa1\x8c.\xe3\x80\x82\xe1\xa2\x91"); } // [X4_2] test { try toAsciiFail("\xe1\xa1\x8c.\xe3\x80\x82\xe1\xa2\x91", false); } // [A4_2] test { try toAsciiFail("\xe1\xa1\x8c.\xe3\x80\x82\xe1\xa2\x91", true); } // [A4_2] -test { try toUnicodeFail("xn--c8e..xn--bbf"); } // [X4_2] test { try toAsciiFail("xn--c8e..xn--bbf", false); } // [A4_2] test { try toAsciiFail("xn--c8e..xn--bbf", true); } // [A4_2] test { try toUnicodeFail("xn--c8e.xn--bbf9168i"); } // [V7] @@ -8873,19 +8843,14 @@ test { try toAsciiFail("\xef\xb8\x92\xef\xbd\xa1\xe1\x82\xa3\xe2\x89\xaf", true) test { try toUnicodeFail("\xef\xb8\x92\xef\xbd\xa1\xe1\x82\xa3>\xcc\xb8"); } // [V7] test { try toAsciiFail("\xef\xb8\x92\xef\xbd\xa1\xe1\x82\xa3>\xcc\xb8", false); } // [V7] test { try toAsciiFail("\xef\xb8\x92\xef\xbd\xa1\xe1\x82\xa3>\xcc\xb8", true); } // [V7] -test { try toUnicodeFail("\xe3\x80\x82\xe3\x80\x82\xe1\x82\xa3\xe2\x89\xaf"); } // [X4_2] test { try toAsciiFail("\xe3\x80\x82\xe3\x80\x82\xe1\x82\xa3\xe2\x89\xaf", false); } // [A4_2] test { try toAsciiFail("\xe3\x80\x82\xe3\x80\x82\xe1\x82\xa3\xe2\x89\xaf", true); } // [A4_2] -test { try toUnicodeFail("\xe3\x80\x82\xe3\x80\x82\xe1\x82\xa3>\xcc\xb8"); } // [X4_2] test { try toAsciiFail("\xe3\x80\x82\xe3\x80\x82\xe1\x82\xa3>\xcc\xb8", false); } // [A4_2] test { try toAsciiFail("\xe3\x80\x82\xe3\x80\x82\xe1\x82\xa3>\xcc\xb8", true); } // [A4_2] -test { try toUnicodeFail("\xe3\x80\x82\xe3\x80\x82\xe2\xb4\x83>\xcc\xb8"); } // [X4_2] test { try toAsciiFail("\xe3\x80\x82\xe3\x80\x82\xe2\xb4\x83>\xcc\xb8", false); } // [A4_2] test { try toAsciiFail("\xe3\x80\x82\xe3\x80\x82\xe2\xb4\x83>\xcc\xb8", true); } // [A4_2] -test { try toUnicodeFail("\xe3\x80\x82\xe3\x80\x82\xe2\xb4\x83\xe2\x89\xaf"); } // [X4_2] test { try toAsciiFail("\xe3\x80\x82\xe3\x80\x82\xe2\xb4\x83\xe2\x89\xaf", false); } // [A4_2] test { try toAsciiFail("\xe3\x80\x82\xe3\x80\x82\xe2\xb4\x83\xe2\x89\xaf", true); } // [A4_2] -test { try toUnicodeFail("..xn--hdh782b"); } // [X4_2] test { try toAsciiFail("..xn--hdh782b", false); } // [A4_2] test { try toAsciiFail("..xn--hdh782b", true); } // [A4_2] test { try toUnicodeFail("\xef\xb8\x92\xef\xbd\xa1\xe2\xb4\x83>\xcc\xb8"); } // [V7] @@ -9035,7 +9000,6 @@ test { try toAsciiFail("\xe2\x80\x8c\xe2\x80\x8d.\xf0\x9e\xa4\xbf", true); } // test { try toUnicodeFail("\xe2\x80\x8c\xe2\x80\x8d.\xf0\x9e\xa4\x9d"); } // [B1, C1, C2] test { try toAsciiFail("\xe2\x80\x8c\xe2\x80\x8d.\xf0\x9e\xa4\x9d", false); } // [B1, C1, C2] test { try toAsciiFail("\xe2\x80\x8c\xe2\x80\x8d.\xf0\x9e\xa4\x9d", true); } // [A4_2] -test { try toUnicodeFail(".xn--3e6h"); } // [X4_2] test { try toAsciiFail(".xn--3e6h", false); } // [A4_2] test { try toAsciiFail(".xn--3e6h", true); } // [A4_2] test { try toUnicodeFail("xn--0ugc.xn--3e6h"); } // [B1, C1, C2] @@ -9227,10 +9191,8 @@ test { try toAsciiFail("xn--skb.xn--osd737a", true); } // [V7] test { try toUnicodeFail("\xe3\xa8\x9b\xf0\x98\xb1\x8e.\xef\xb8\x92\xf0\x9d\x9f\x95\xe0\xb4\x81"); } // [V7] test { try toAsciiFail("\xe3\xa8\x9b\xf0\x98\xb1\x8e.\xef\xb8\x92\xf0\x9d\x9f\x95\xe0\xb4\x81", false); } // [V7] test { try toAsciiFail("\xe3\xa8\x9b\xf0\x98\xb1\x8e.\xef\xb8\x92\xf0\x9d\x9f\x95\xe0\xb4\x81", true); } // [V7] -test { try toUnicodeFail("\xe3\xa8\x9b\xf0\x98\xb1\x8e.\xe3\x80\x827\xe0\xb4\x81"); } // [X4_2] test { try toAsciiFail("\xe3\xa8\x9b\xf0\x98\xb1\x8e.\xe3\x80\x827\xe0\xb4\x81", false); } // [A4_2] test { try toAsciiFail("\xe3\xa8\x9b\xf0\x98\xb1\x8e.\xe3\x80\x827\xe0\xb4\x81", true); } // [A4_2] -test { try toUnicodeFail("xn--mbm8237g..xn--7-7hf"); } // [X4_2] test { try toAsciiFail("xn--mbm8237g..xn--7-7hf", false); } // [A4_2] test { try toAsciiFail("xn--mbm8237g..xn--7-7hf", true); } // [A4_2] test { try toUnicodeFail("xn--mbm8237g.xn--7-7hf1526p"); } // [V7] @@ -9824,7 +9786,6 @@ test { try toAsciiFail("\xe2\x80\x8d.j", true); } // [A4_2] test { try toUnicodeFail("\xe2\x80\x8d.J"); } // [C2] test { try toAsciiFail("\xe2\x80\x8d.J", false); } // [C2] test { try toAsciiFail("\xe2\x80\x8d.J", true); } // [A4_2] -test { try toUnicodeFail(".j"); } // [X4_2] test { try toAsciiFail(".j", false); } // [A4_2] test { try toAsciiFail(".j", true); } // [A4_2] test { try toUnicodeFail("xn--1ug.j"); } // [C2] @@ -10778,7 +10739,6 @@ test { try toAsciiFail("\xe2\x80\x8c\xef\xbd\xa1\xef\xb8\x92", true); } // [V7, test { try toUnicodeFail("\xe2\x80\x8c\xe3\x80\x82\xe3\x80\x82"); } // [C1, X4_2] test { try toAsciiFail("\xe2\x80\x8c\xe3\x80\x82\xe3\x80\x82", false); } // [C1, A4_2] test { try toAsciiFail("\xe2\x80\x8c\xe3\x80\x82\xe3\x80\x82", true); } // [A4_2] -test { try toUnicodeFail(".."); } // [X4_2] test { try toAsciiFail("..", false); } // [A4_2] test { try toAsciiFail("..", true); } // [A4_2] test { try toUnicodeFail("xn--0ug.."); } // [C1, X4_2] @@ -11000,7 +10960,6 @@ test { try toAsciiFail("\xe2\x80\x8d51.\xe3\x80\x82\xe2\x89\xaf8\xe2\x80\x8d", t test { try toUnicodeFail("\xe2\x80\x8d51.\xe3\x80\x82>\xcc\xb88\xe2\x80\x8d"); } // [C2, X4_2] test { try toAsciiFail("\xe2\x80\x8d51.\xe3\x80\x82>\xcc\xb88\xe2\x80\x8d", false); } // [C2, A4_2] test { try toAsciiFail("\xe2\x80\x8d51.\xe3\x80\x82>\xcc\xb88\xe2\x80\x8d", true); } // [A4_2] -test { try toUnicodeFail("51..xn--8-ogo"); } // [X4_2] test { try toAsciiFail("51..xn--8-ogo", false); } // [A4_2] test { try toAsciiFail("51..xn--8-ogo", true); } // [A4_2] test { try toUnicodeFail("xn--51-l1t..xn--8-ugn00i"); } // [C2, X4_2] @@ -13598,7 +13557,6 @@ test { try toAsciiFail("\xe3\x80\x82\xe1\x82\xb6\xcd\xa6.\xe2\x80\x8c", true); } test { try toUnicodeFail("\xe3\x80\x82\xe2\xb4\x96\xcd\xa6.\xe2\x80\x8c"); } // [C1, X4_2] test { try toAsciiFail("\xe3\x80\x82\xe2\xb4\x96\xcd\xa6.\xe2\x80\x8c", false); } // [C1, A4_2] test { try toAsciiFail("\xe3\x80\x82\xe2\xb4\x96\xcd\xa6.\xe2\x80\x8c", true); } // [A4_2] -test { try toUnicodeFail(".xn--hva754s."); } // [X4_2] test { try toAsciiFail(".xn--hva754s.", false); } // [A4_2] test { try toAsciiFail(".xn--hva754s.", true); } // [A4_2] test { try toUnicodeFail(".xn--hva754s.xn--0ug"); } // [C1, X4_2] @@ -14168,7 +14126,6 @@ test { try toAsciiFail("\xe2\x80\x8c\xe2\x80\x8c\xe3\x80\x821.\xe2\x89\xaf9", tr test { try toUnicodeFail("\xe2\x80\x8c\xe2\x80\x8c\xe3\x80\x821.>\xcc\xb89"); } // [C1] test { try toAsciiFail("\xe2\x80\x8c\xe2\x80\x8c\xe3\x80\x821.>\xcc\xb89", false); } // [C1] test { try toAsciiFail("\xe2\x80\x8c\xe2\x80\x8c\xe3\x80\x821.>\xcc\xb89", true); } // [A4_2] -test { try toUnicodeFail(".1.xn--9-ogo"); } // [X4_2] test { try toAsciiFail(".1.xn--9-ogo", false); } // [A4_2] test { try toAsciiFail(".1.xn--9-ogo", true); } // [A4_2] test { try toUnicodeFail("xn--0uga.1.xn--9-ogo"); } // [C1] @@ -14933,7 +14890,6 @@ test { try toAsciiFail("\xe2\x80\x8d\xe3\x80\x82\xf0\x9e\xa4\x98", true); } // [ test { try toUnicodeFail("\xe2\x80\x8d\xe3\x80\x82\xf0\x9e\xa4\xba"); } // [B1, C2] test { try toAsciiFail("\xe2\x80\x8d\xe3\x80\x82\xf0\x9e\xa4\xba", false); } // [B1, C2] test { try toAsciiFail("\xe2\x80\x8d\xe3\x80\x82\xf0\x9e\xa4\xba", true); } // [A4_2] -test { try toUnicodeFail(".xn--ye6h"); } // [X4_2] test { try toAsciiFail(".xn--ye6h", false); } // [A4_2] test { try toAsciiFail(".xn--ye6h", true); } // [A4_2] test { try toUnicodeFail("xn--1ug.xn--ye6h"); } // [B1, C2] @@ -15857,7 +15813,6 @@ test { try toAsciiFail("\xe2\x80\x8d.F", true); } // [A4_2] test { try toUnicodeFail("\xe2\x80\x8d.f"); } // [C2] test { try toAsciiFail("\xe2\x80\x8d.f", false); } // [C2] test { try toAsciiFail("\xe2\x80\x8d.f", true); } // [A4_2] -test { try toUnicodeFail(".f"); } // [X4_2] test { try toAsciiFail(".f", false); } // [A4_2] test { try toAsciiFail(".f", true); } // [A4_2] test { try toUnicodeFail("xn--1ug.f"); } // [C2] @@ -16610,7 +16565,6 @@ test { try toAsciiFail("\xe2\x80\x8d\xe2\x80\x8c\xf3\xa0\x86\xaa\xe3\x80\x82ss\x test { try toUnicodeFail("\xe2\x80\x8d\xe2\x80\x8c\xf3\xa0\x86\xaa\xe3\x80\x82Ss\xf0\x91\x93\x83"); } // [C1, C2] test { try toAsciiFail("\xe2\x80\x8d\xe2\x80\x8c\xf3\xa0\x86\xaa\xe3\x80\x82Ss\xf0\x91\x93\x83", false); } // [C1, C2] test { try toAsciiFail("\xe2\x80\x8d\xe2\x80\x8c\xf3\xa0\x86\xaa\xe3\x80\x82Ss\xf0\x91\x93\x83", true); } // [A4_2] -test { try toUnicodeFail(".xn--ss-bh7o"); } // [X4_2] test { try toAsciiFail(".xn--ss-bh7o", false); } // [A4_2] test { try toAsciiFail(".xn--ss-bh7o", true); } // [A4_2] test { try toUnicodeFail("xn--0ugb.xn--ss-bh7o"); } // [C1, C2] @@ -16646,7 +16600,6 @@ test { try toAsciiFail("\xef\xb8\x92\xe2\x80\x8c\xe3\x83\xb6\xe4\x92\xa9.\xea\xa test { try toUnicodeFail("\xe3\x80\x82\xe2\x80\x8c\xe3\x83\xb6\xe4\x92\xa9.\xea\xa1\xaa"); } // [C1, X4_2] test { try toAsciiFail("\xe3\x80\x82\xe2\x80\x8c\xe3\x83\xb6\xe4\x92\xa9.\xea\xa1\xaa", false); } // [C1, A4_2] test { try toAsciiFail("\xe3\x80\x82\xe2\x80\x8c\xe3\x83\xb6\xe4\x92\xa9.\xea\xa1\xaa", true); } // [A4_2] -test { try toUnicodeFail(".xn--qekw60d.xn--gd9a"); } // [X4_2] test { try toAsciiFail(".xn--qekw60d.xn--gd9a", false); } // [A4_2] test { try toAsciiFail(".xn--qekw60d.xn--gd9a", true); } // [A4_2] test { try toUnicodeFail(".xn--0ug287dj0o.xn--gd9a"); } // [C1, X4_2] @@ -16703,10 +16656,8 @@ test { try toAsciiFail("xn--0ug78ol75wzcx4i.xn--jof95xex98m", true); } // [B1, C test { try toUnicodeFail("\xf0\x9d\x85\xb5\xef\xbd\xa1\xf0\x9d\x9f\xab\xf0\x9e\x80\x88\xe4\xac\xba\xe2\x92\x88"); } // [V7, X4_2] test { try toAsciiFail("\xf0\x9d\x85\xb5\xef\xbd\xa1\xf0\x9d\x9f\xab\xf0\x9e\x80\x88\xe4\xac\xba\xe2\x92\x88", false); } // [V7, A4_2] test { try toAsciiFail("\xf0\x9d\x85\xb5\xef\xbd\xa1\xf0\x9d\x9f\xab\xf0\x9e\x80\x88\xe4\xac\xba\xe2\x92\x88", true); } // [V7, A4_2] -test { try toUnicodeFail("\xf0\x9d\x85\xb5\xe3\x80\x829\xf0\x9e\x80\x88\xe4\xac\xba1."); } // [X4_2] test { try toAsciiFail("\xf0\x9d\x85\xb5\xe3\x80\x829\xf0\x9e\x80\x88\xe4\xac\xba1.", false); } // [A4_2] test { try toAsciiFail("\xf0\x9d\x85\xb5\xe3\x80\x829\xf0\x9e\x80\x88\xe4\xac\xba1.", true); } // [A4_2] -test { try toUnicodeFail(".xn--91-030c1650n."); } // [X4_2] test { try toAsciiFail(".xn--91-030c1650n.", false); } // [A4_2] test { try toAsciiFail(".xn--91-030c1650n.", true); } // [A4_2] test { try toUnicodeFail(".xn--9-ecp936non25a"); } // [V7, X4_2] @@ -17870,7 +17821,6 @@ test { try toAsciiFail("xn----f3j6s87156i.xn--nfb035hoo2p", true); } // [B1, V3, test { try toUnicodeFail("\xe2\x80\x8d.\xda\xbd\xd9\xa3\xd6\x96"); } // [B1, C2] test { try toAsciiFail("\xe2\x80\x8d.\xda\xbd\xd9\xa3\xd6\x96", false); } // [B1, C2] test { try toAsciiFail("\xe2\x80\x8d.\xda\xbd\xd9\xa3\xd6\x96", true); } // [A4_2] -test { try toUnicodeFail(".xn--hcb32bni"); } // [X4_2] test { try toAsciiFail(".xn--hcb32bni", false); } // [A4_2] test { try toAsciiFail(".xn--hcb32bni", true); } // [A4_2] test { try toUnicodeFail("xn--1ug.xn--hcb32bni"); } // [B1, C2]