mirror of
https://github.com/tiennm99/miti99bot.git
synced 2026-09-03 14:18:33 +00:00
style(wordle): gofmt lookup test table
This commit is contained in:
@@ -4,14 +4,14 @@ import "testing"
|
||||
|
||||
func TestNormalizeWord(t *testing.T) {
|
||||
cases := map[string]string{
|
||||
"": "",
|
||||
"crane": "crane",
|
||||
"CRANE": "crane",
|
||||
" crane ": "crane",
|
||||
"c-r-a-n-e": "crane",
|
||||
"héllo": "hllo", // strips non a-z (including the é and accented o-equivalent)
|
||||
"!@#$%": "",
|
||||
"42 crane": "crane",
|
||||
"": "",
|
||||
"crane": "crane",
|
||||
"CRANE": "crane",
|
||||
" crane ": "crane",
|
||||
"c-r-a-n-e": "crane",
|
||||
"héllo": "hllo", // strips non a-z (including the é and accented o-equivalent)
|
||||
"!@#$%": "",
|
||||
"42 crane": "crane",
|
||||
}
|
||||
for in, want := range cases {
|
||||
if got := normalizeWord(in); got != want {
|
||||
|
||||
Reference in New Issue
Block a user