file_table_flush_data_table_service_test.go
541 字节
package domainService
import (
"github.com/stretchr/testify/assert"
"testing"
)
func Test_PinName(t *testing.T) {
inputs := []struct {
s string
want string
}{
{"a我们", "a_wo_men"},
{"a2我们", "a2_wo_men"},
{"1我们", "1_wo_men"},
{"10.我们", "10._wo_men"},
{"我们", "wo_men"},
{"z.我们", "z._wo_men"},
{"123", "123"},
{"年度", "nian_du"},
{"333", "333"},
{"yyy", "yyy"},
{"1.2.3", "1.2.3"},
}
for _, input := range inputs {
got := pinFull(input.s)
assert.Equal(t, input.want, got)
}
}