From 24c46235a34e0d7537ec18c45c1bfcaf7e565bb8 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Mon, 24 Jun 2019 06:18:18 -0400 Subject: [PATCH] remove m -> rn skeleton mapping again --- irc/strings.go | 2 +- irc/strings_test.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/irc/strings.go b/irc/strings.go index c665dca5..d0bbf8b1 100644 --- a/irc/strings.go +++ b/irc/strings.go @@ -148,7 +148,7 @@ func Skeleton(name string) (string, error) { // same as PRECIS: name = width.Fold.String(name) - name = confusables.Skeleton(name) + name = confusables.SkeletonTweaked(name) // internationalized lowercasing for skeletons; this is much more lenient than // Casefold. In particular, skeletons are expected to mix scripts (which may diff --git a/irc/strings_test.go b/irc/strings_test.go index d1e8b76c..36d67e0c 100644 --- a/irc/strings_test.go +++ b/irc/strings_test.go @@ -153,8 +153,8 @@ func TestSkeleton(t *testing.T) { return skel } - if skeleton("warning") != skeleton("waming") { - t.Errorf("i give up, Oragono should consider rn confusable with m") + if skeleton("warning") == skeleton("waming") { + t.Errorf("Oragono shouldn't consider rn confusable with m") } if skeleton("Phi|ip") != "philip" { @@ -165,7 +165,7 @@ func TestSkeleton(t *testing.T) { t.Errorf("fullwidth characters should skeletonize to plain old ascii characters") } - if skeleton("SMT") != "smt" { + if skeleton("SMT") != skeleton("smt") { t.Errorf("after skeletonizing, we should casefold") }