阶段性提交

This commit is contained in:
GoEdgeLab
2020-09-10 21:04:57 +08:00
parent 5a941ec9d7
commit 4aa45fe339
36 changed files with 3408 additions and 23 deletions

View File

@@ -0,0 +1,17 @@
package shared
import (
"github.com/iwind/TeaGo/assert"
"testing"
)
func TestRegexp(t *testing.T) {
a := assert.NewAssertion(t)
a.IsTrue(RegexpFloatNumber.MatchString("123"))
a.IsTrue(RegexpFloatNumber.MatchString("123.456"))
a.IsFalse(RegexpFloatNumber.MatchString(".456"))
a.IsFalse(RegexpFloatNumber.MatchString("abc"))
a.IsFalse(RegexpFloatNumber.MatchString("123."))
a.IsFalse(RegexpFloatNumber.MatchString("123.456e7"))
}