This commit is contained in:
2026-03-07 05:30:18 +07:00
parent 186d09ba5a
commit 3612805009
4 changed files with 112 additions and 66 deletions
+29
View File
@@ -41,3 +41,32 @@ func Test_service_ClearCode(t *testing.T) {
})
}
}
func Test_service_ClearText(t *testing.T) {
tests := []struct {
text string
want string
}{
{
text: "text",
want: "text",
},
{
text: "text ([Ы])",
want: "text",
},
{
text: "text ([Ы-3])",
want: "text",
},
}
for _, tt := range tests {
t.Run(tt.text, func(t *testing.T) {
var s service
got := s.ClearText(tt.text)
if got != tt.want {
t.Errorf("ClearText() = %v, want %v", got, tt.want)
}
})
}
}