commit 7aa925863334a2e568bdeaa6c387488b32f333ac from: Omar Polo date: Fri Apr 30 19:08:27 2021 UTC make more explicit the per-location roots test commit - 737a6b50c599460a5e69c8a89e41f9881ff07f88 commit + 7aa925863334a2e568bdeaa6c387488b32f333ac blob - 5e61d2a4327e4c1bc365deefbda815b2a0a84332 blob + 02cd09b8190a6bee289f07716da2a20e7c8a1476 --- regress/runtime +++ regress/runtime @@ -312,8 +312,16 @@ config '' 'location "/foo/*" { root "'$PWD'/testdata" checkconf restart -# XXX: this fails, because /foo isn't matched by /foo/*, but it would -# be nice if it worked. -#eq "$(head /foo)" "30 /foo/" "Unexpected head for /foo" +eq "$(head /foo)" "51 not found" "Unexpected head for /foo" +eq "$(head /foo/)" "20 text/gemini" "Unexpected head for /foo/" + +# how to match both /foo and /foo/* +config '' ' + location "/foo" { block return 31 "%p/" } + location "/foo/*" { root "'$PWD'/testdata" strip 1 } +' +checkconf +restart +eq "$(head /foo)" "31 /foo/" "Unexpected head for /foo" eq "$(head /foo/)" "20 text/gemini" "Unexpected head for /foo/"