blob: 21a6f5133e20323c003effe14daa1064ac3a74f3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/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

command -v python3 >/dev/null 2>&1 || {
	skip_all='Skipping preview server tests: python3 not found'
	test_done
	exit
}

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