mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-06 01:50:25 +08:00
优化代码/删除不需要的代码
This commit is contained in:
19
internal/utils/regexputils/expr_test.go
Normal file
19
internal/utils/regexputils/expr_test.go
Normal 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"))
|
||||
}
|
||||
Reference in New Issue
Block a user