test: add more test

This commit is contained in:
yangshangbo
2025-04-16 09:56:13 +08:00
parent 028d7013a8
commit d1db668cd6
+3 -1
View File
@@ -9,7 +9,9 @@ fn init() {
is_match3, reg := match_path_with_regex('/users/123/posts/456/comments', '/users/**') is_match3, reg := match_path_with_regex('/users/123/posts/456/comments', '/users/**')
println('reg: ${reg.query}') println('reg: ${reg.query}')
assert is_match3 == true assert is_match3 == true
is_match4, _ := match_path_with_regex('/article+&9/杨/why-!important#999', '/article+&*/:杨/why-!important#999') is_match4, _ := match_path_with_regex('/article+&9/article1/why-!important#999', '/article+&*/:article/why-!important#999')
assert is_match4 == true assert is_match4 == true
is_match5, _ := match_path_with_regex('/api/aaa/bbb/////888', '/api/**/888')
assert is_match5 == true
println('all tests passed') println('all tests passed')
} }