1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

vweb: fix catchall route (#11168)

This commit is contained in:
Miccah
2021-08-12 11:05:50 -05:00
committed by GitHub
parent a8905e2788
commit 1a7ba6f6d4
2 changed files with 16 additions and 0 deletions

View File

@ -268,3 +268,15 @@ fn test_route_params_array() {
route: '/:a/:b/:c...'
}.test_param(['one', 'two', 'three/d/e'])
}
fn test_route_index_path() {
RoutePair{
url: '/'
route: '/:path...'
}.test_param(['/'])
RoutePair{
url: '/foo/bar'
route: '/:path...'
}.test_param(['/foo/bar'])
}