修改路由匹配正则表达式,添加更多测试用例

This commit is contained in:
yangshangbo
2025-04-15 14:08:42 +08:00
parent 8b18de9693
commit d1da1e9bc1
4 changed files with 18 additions and 8 deletions
+2
View File
@@ -9,5 +9,7 @@ fn init() {
is_match3, reg := match_path_with_regex('/users/123/posts/456/comments', '/users/**')
println('reg: ${reg.query}')
assert is_match3 == true
is_match4, _ := match_path_with_regex('/article+&9/杨/why-!important#999', '/article+&*/:杨/why-!important#999')
assert is_match4 == true
println('all tests passed')
}