Explorar el Código

remove m -> rn skeleton mapping again

tags/v1.1.0
Shivaram Lingamneni hace 5 años
padre
commit
24c46235a3
Se han modificado 2 ficheros con 4 adiciones y 4 borrados
  1. 1
    1
      irc/strings.go
  2. 3
    3
      irc/strings_test.go

+ 1
- 1
irc/strings.go Ver fichero

@@ -148,7 +148,7 @@ func Skeleton(name string) (string, error) {
148 148
 	// same as PRECIS:
149 149
 	name = width.Fold.String(name)
150 150
 
151
-	name = confusables.Skeleton(name)
151
+	name = confusables.SkeletonTweaked(name)
152 152
 
153 153
 	// internationalized lowercasing for skeletons; this is much more lenient than
154 154
 	// Casefold. In particular, skeletons are expected to mix scripts (which may

+ 3
- 3
irc/strings_test.go Ver fichero

@@ -153,8 +153,8 @@ func TestSkeleton(t *testing.T) {
153 153
 		return skel
154 154
 	}
155 155
 
156
-	if skeleton("warning") != skeleton("waming") {
157
-		t.Errorf("i give up, Oragono should consider rn confusable with m")
156
+	if skeleton("warning") == skeleton("waming") {
157
+		t.Errorf("Oragono shouldn't consider rn confusable with m")
158 158
 	}
159 159
 
160 160
 	if skeleton("Phi|ip") != "philip" {
@@ -165,7 +165,7 @@ func TestSkeleton(t *testing.T) {
165 165
 		t.Errorf("fullwidth characters should skeletonize to plain old ascii characters")
166 166
 	}
167 167
 
168
-	if skeleton("SMT") != "smt" {
168
+	if skeleton("SMT") != skeleton("smt") {
169 169
 		t.Errorf("after skeletonizing, we should casefold")
170 170
 	}
171 171
 

Loading…
Cancelar
Guardar