优化代码/删除不需要的代码

This commit is contained in:
GoEdgeLab
2022-10-14 10:03:29 +08:00
parent 9ea5b3f87a
commit 4a880a5ab7
42 changed files with 554 additions and 1256 deletions

View File

@@ -0,0 +1,19 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
package regexputils_test
import (
"github.com/TeaOSLab/EdgeAPI/internal/utils/regexputils"
"github.com/iwind/TeaGo/assert"
"testing"
)
func TestExpr(t *testing.T) {
var a = assert.NewAssertion(t)
a.IsTrue(regexputils.YYYYMMDD.MatchString("20221011"))
a.IsFalse(regexputils.YYYYMMDD.MatchString("202210"))
a.IsTrue(regexputils.YYYYMM.MatchString("202210"))
a.IsFalse(regexputils.YYYYMM.MatchString("20221011"))
}