@@ -102,7 +102,7 @@ func TestLabelErrors(t *testing.T) {
102
102
// Chrome, modern Firefox, Safari, and IE.
103
103
{resolve , "lab⒐be" , "xn--labbe-zh9b" , "P1" }, // encode("lab⒐be")
104
104
{display , "lab⒐be" , "lab⒐be" , "P1" },
105
- {resolve , "plan⒐faß.de" , "xn--planfass-c31e.de" , "P1" }, // encode("plan⒐fass") + ".de"
105
+ {transitional , "plan⒐faß.de" , "xn--planfass-c31e.de" , "P1" }, // encode("plan⒐fass") + ".de"
106
106
{display , "Plan⒐faß.de" , "plan⒐faß.de" , "P1" },
107
107
108
108
// Transitional vs Nontransitional processing
@@ -115,10 +115,10 @@ func TestLabelErrors(t *testing.T) {
115
115
// punycode on the result using transitional mapping.
116
116
// Firefox 49.0.1 goes haywire on this string and prints a bunch of what
117
117
// seems to be nested punycode encodings.
118
- {resolve , "日本⒈co.ßßß.de" , "xn--co-wuw5954azlb.ssssss.de" , "P1" },
118
+ {transitional , "日本⒈co.ßßß.de" , "xn--co-wuw5954azlb.ssssss.de" , "P1" },
119
119
{display , "日本⒈co.ßßß.de" , "日本⒈co.ßßß.de" , "P1" },
120
120
121
- {resolve , "a\u200C b" , "ab" , "" },
121
+ {transitional , "a\u200C b" , "ab" , "" },
122
122
{display , "a\u200C b" , "a\u200C b" , "C" },
123
123
124
124
{resolve , encode ("a\u200C b" ), encode ("a\u200C b" ), "C" },
@@ -153,3 +153,11 @@ func TestLabelErrors(t *testing.T) {
153
153
doTest (t , tc .f , tc .name , tc .input , tc .want , tc .wantErr )
154
154
}
155
155
}
156
+
157
+ func TestTransitionalDefault (t * testing.T ) {
158
+ want := "xn--strae-oqa.de"
159
+ if transitionalLookup {
160
+ want = "strasse.de"
161
+ }
162
+ doTest (t , Lookup .ToASCII , "Lookup" , "straße.de" , want , "" )
163
+ }
0 commit comments