28
import (
"testing"
"github.com/stretchr/testify/assert”
)
func TestCleansingExample (t *testing.T) {
var testCases := []struct {
desc string
in string
want string
}{
{“ϚτϞͳσʔλ”,
“03-1234-5678”,
“03-1234-5678”},
{“ϝΞυೖͬͯΔߥΕͨσʔλ”,
“TEL:03-1234-9876 email:
[email protected]”,
“03-1234-9876”},
}
for _, test := range testCases {
assert.Equal(t, Cleansing(test.in), test.want, test.desc)
}
}
͜͜ʹ
lߥΕͨσʔλzͱ
l·͍͠σʔλzͷ
ςετέʔεΛՃ͑ͯɺ
5%%ͷαΠΫϧΛճ͢