diff options
author | Omar Polo <op@omarpolo.com> | 2021-01-24 14:11:40 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2021-01-24 14:11:40 +0000 |
commit | c8b74339185123feebb6164b91f500f1930e45ff (patch) | |
tree | 29c17d8b2b9c0c4a408d347b1b5ca0890ab52ef7 /regress | |
parent | 501e489c90eeddec3f29b014864f57e840ea1fa8 (diff) |
added support for location blocks
Diffstat (limited to 'regress')
-rw-r--r-- | regress/Makefile | 1 | ||||
-rwxr-xr-x | regress/runtime | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/regress/Makefile b/regress/Makefile index 195cb0d..3c9c572 100644 --- a/regress/Makefile +++ b/regress/Makefile @@ -35,6 +35,7 @@ testdata: fill-file ./sha testdata/index.gmi testdata/index.gmi.sha cp hello slow err invalid serve-bigfile testdata/ mkdir testdata/dir + cp hello testdata/dir cp testdata/index.gmi testdata/dir/foo.gmi runtime: testdata cert.pem diff --git a/regress/runtime b/regress/runtime index 6456746..8cf2afb 100755 --- a/regress/runtime +++ b/regress/runtime @@ -191,3 +191,17 @@ echo OK GET /dir/ with custom index check "should be running" quit + +config '' 'location "/dir/" { default type "text/plain" index "hello" }' +checkconf +run + +eq "$(head /dir/hello)" "20 text/plain" "Unexpected head for /" +echo OK GET /dir/hello with location and default type + +eq "$(head /dir/)" "20 text/plain" "Unexpected head for /dir" +eq "$(get /dir/|tail -1)" 'echo "# hello world"' "Unexpected body for /dir/" +echo OK GET /dir/ with location and custom index + +check "should be running" +quit |