#!/bin/sh # Checks how tools/serve.py, the preview server that runs the built binary and # hands its output back over HTTP, tells the CGI headers from the body. The # cases live in serve-split-check.py beside this file, and nothing here touches # a repository, so the fixtures stay unbuilt. test_description='Check the preview server splits CGI output correctly' CGIT_TEST_NO_CREATE_REPOS=YesPlease . ./setup.sh # serve.py uses syntax that came with Python 3.8. test_lazy_prereq PYTHON ' python3 -c "import sys; sys.exit(sys.version_info < (3, 8))" ' test_have_prereq PYTHON || { skip_all='Skipping preview server tests: no python3 3.8 or later' test_done } test_expect_success 'CGI headers and body are split at the first blank line' ' python3 "$TEST_OUTPUT_DIRECTORY/serve-split-check.py" "$TEST_OUTPUT_DIRECTORY/.." ' test_done