-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathspam_test.go
More file actions
28 lines (25 loc) · 799 Bytes
/
spam_test.go
File metadata and controls
28 lines (25 loc) · 799 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package scam_backoffice_rules
import "testing"
func TestNormalizeString(t *testing.T) {
tests := []struct {
input string
expected string
}{
{input: "USD₮", expected: "usdt"},
{input: "subbotin.ton", expected: "subbotinton"},
{input: "MAJOR", expected: "major"},
{input: "TON Believers Fund", expected: "tonbelieversfund"},
{input: "Tést.ton", expected: "testton"},
{input: "123USD", expected: "123usd"},
{input: " special*chars! ", expected: "specialchars"},
{input: "Multiple Spaces", expected: "multiplespaces"},
}
for _, test := range tests {
t.Run(test.input, func(t *testing.T) {
result := NormalizeString(test.input)
if result != test.expected {
t.Errorf("For input %v, got %v but expected %v", test.input, result, test.expected)
}
})
}
}