| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- package utl
- import (
- "testing"
- )
- func TestIsPhone(t *testing.T) {
- phones := []string{
- "137234510452",
- "12398765434",
- "13604550543",
- "13456786543",
- "16703440355",
- "19100001111",
- "19200001111",
- }
- var b, bs bool
- var phone string
- phone = phones[0]
- bs, b = IsPhoneSimple(phone), IsPhone(phone)
- AssertFalse(bs, phone + " should not be phone", t)
- AssertFalse(b, phone + " should not be phone", t)
- phone = phones[1]
- bs, b = IsPhoneSimple(phone), IsPhone(phone)
- AssertTrue(bs, phone + " should be phone", t)
- AssertFalse(b, phone + " should not be phone", t)
- }
- func TestIsEmail(t *testing.T) {
- }
- func TestIsAlpha(t *testing.T) {
- }
- func TestIsSafePasswd(t *testing.T) {
- }
|