diff options
author | Omar Polo <op@omarpolo.com> | 2023-07-23 18:45:43 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2023-07-23 18:45:43 +0000 |
commit | fdd67729b45c7073be9ea1720cbadbaae8f0d112 (patch) | |
tree | f3789221979c6e49d6b6001d65553894903a4182 /regress | |
parent | a1ba9650a9f0cc0d9e70800d71769d32f927b939 (diff) |
adjust syntax in fastcgi test; add another test for the old syntax
Diffstat (limited to 'regress')
-rwxr-xr-x | regress/regress | 1 | ||||
-rw-r--r-- | regress/tests.sh | 22 |
2 files changed, 22 insertions, 1 deletions
diff --git a/regress/regress b/regress/regress index e21e291..16f5897 100755 --- a/regress/regress +++ b/regress/regress @@ -51,6 +51,7 @@ run_test test_require_client_ca run_test test_root_inside_location run_test test_root_inside_location_with_redirect run_test test_fastcgi +run_test test_fastcgi_deprecated_syntax run_test test_macro_expansion run_test test_proxy_relay_to run_test test_proxy_with_certs diff --git a/regress/tests.sh b/regress/tests.sh index 624b6d5..e2d4a27 100644 --- a/regress/tests.sh +++ b/regress/tests.sh @@ -218,7 +218,7 @@ test_fastcgi() { ./fcgi-test fcgi.sock & fcgi_pid=$! - setup_simple_test 'prefork 1' 'fastcgi "'$PWD'/fcgi.sock"' + setup_simple_test 'prefork 1' 'fastcgi socket "'$PWD'/fcgi.sock"' msg=$(printf "# hello from fastcgi!\nsome more content in the page...") @@ -238,6 +238,26 @@ test_fastcgi() { return 0 } +test_fastcgi_deprecated_syntax() { + ./fcgi-test fcgi.sock & + fcgi_pid=$! + + # the old syntax will eventually go away, but check that the + # backward compatibility works. + setup_simple_test 'prefork 1' 'fastcgi "'$PWD'/fcgi.sock"' + + msg=$(printf "# hello from fastcgi!\nsome more content in the page...") + fetch / + check_reply "20 text/gemini" "$msg" + if [ $? -ne 0 ]; then + kill $fcgi_pid + return 1 + fi + + kill $fcgi_pid + return 0 +} + test_macro_expansion() { cat <<EOF > reg.conf pwd = "$PWD" |