generated from VLADIMIR/template
clear
This commit is contained in:
@@ -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)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user