mirror of
https://github.com/jeremyd/ergo.git
synced 2026-04-26 15:40:00 -07:00
fix #306
Fix spurious bidi rule violations in casefolding channel names by stripping the # before starting the casefolding.
This commit is contained in:
@@ -40,10 +40,21 @@ func TestCasefoldChannel(t *testing.T) {
|
||||
channel: "#",
|
||||
folded: "#",
|
||||
},
|
||||
{
|
||||
channel: "#中文频道",
|
||||
folded: "#中文频道",
|
||||
},
|
||||
{
|
||||
// Hebrew; it's up to the client to display this right-to-left, including the #
|
||||
channel: "#שלום",
|
||||
folded: "#שלום",
|
||||
},
|
||||
}
|
||||
|
||||
for _, errCase := range []string{
|
||||
"", "#*starpower", "# NASA", "#interro?", "OOF#", "foo",
|
||||
// bidi violation mixing latin and hebrew characters:
|
||||
"#shalomעליכם",
|
||||
} {
|
||||
testCases = append(testCases, channelTest{channel: errCase, err: true})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user